disp: msm: sde: check for valid pointer before accessing

This change initializes a variable as null to account for cases
when it is not set. This change also ensures proper pointer
checks before attempting to access function pointer.

Change-Id: I2f06a0877293668e80bee9d9b82d412476dc5184
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
This commit is contained in:
Samantha Tran
2021-04-26 20:19:32 -07:00
committed by Gerrit - the friendly Code Review server
parent b0ea2d882f
commit 978edfa200
2 changed files with 2 additions and 2 deletions

View File

@@ -2347,7 +2347,7 @@ static void _sde_plane_get_max_downscale_limits(struct sde_plane *psde,
{
bool rotated, has_predown, default_scale;
const struct sde_sspp_sub_blks *sblk;
struct sde_hw_inline_pre_downscale_cfg *pd;
struct sde_hw_inline_pre_downscale_cfg *pd = NULL;
rotated = pstate->rotation & DRM_MODE_ROTATE_90;
sblk = psde->pipe_sblk;