msm: mdss: fix possible null dereferencing in interface writeback

Added null check to avoid possible null pointer dereferencing.

Change-Id: Iedafe6e308b7b4a1d43efa7c37a26afd16fa1989
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
This commit is contained in:
Veera Sundaram Sankaran 2014-11-07 16:30:39 -08:00 committed by David Keitel
parent 21ce99e154
commit cec2b17af6

View file

@ -294,7 +294,7 @@ static int mdss_mdp_writeback_format_setup(struct mdss_mdp_writeback_ctx *ctx,
}
if (ctx->type == MDSS_MDP_WRITEBACK_TYPE_ROTATOR &&
mdata->has_rot_dwnscale) {
mdata && mdata->has_rot_dwnscale) {
dnsc_factor = (ctx->dnsc_factor_h) | (ctx->dnsc_factor_w << 16);
mdp_wb_write(ctx, MDSS_MDP_REG_WB_ROTATOR_PIPE_DOWNSCALER,
dnsc_factor);