drm/msm: Fix potential NULL dereference in DPU SSPP
authorJessica Zhang <jesszhan@codeaurora.org>
Wed, 20 Oct 2021 17:57:33 +0000 (10:57 -0700)
committerRob Clark <robdclark@chromium.org>
Thu, 21 Oct 2021 20:40:28 +0000 (13:40 -0700)
commit8bf71a5719b6cc5b6ba358096081e5d50ea23ab6
treed2e56529916a3ac454ee301a93f0ca53ad7e5c88
parent57fd4f34ddac61c9ef5ec7a3d91d58f590626c87
drm/msm: Fix potential NULL dereference in DPU SSPP

Move initialization of sblk in _sspp_subblk_offset() after NULL check to
avoid potential NULL pointer dereference.

Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jessica Zhang <jesszhan@codeaurora.org>
Link: https://lore.kernel.org/r/20211020175733.3379-1-jesszhan@codeaurora.org
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c