Skip to content
Commit 79592a6e authored by Abhinav Kumar's avatar Abhinav Kumar Committed by Greg Kroah-Hartman
Browse files

drm/msm/dpu: check for valid hw_pp in dpu_encoder_helper_phys_cleanup

[ Upstream commit 7f3d03c4 ]

The commit 8b45a26f

 ("drm/msm/dpu: reserve cdm blocks for writeback
in case of YUV output") introduced a smatch warning about another
conditional block in dpu_encoder_helper_phys_cleanup() which had assumed
hw_pp will always be valid which may not necessarily be true.

Lets fix the other conditional block by making sure hw_pp is valid
before dereferencing it.

Reported-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Fixes: ae4d721c

 ("drm/msm/dpu: add an API to reset the encoder related hw blocks")
Reviewed-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/574878/
Link: https://lore.kernel.org/r/20240117194109.21609-1-quic_abhinavk@quicinc.com
Signed-off-by: default avatarAbhinav Kumar <quic_abhinavk@quicinc.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 1449c757
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment