[PATCH] drm/msm/dpu: check for valid hw_pp in dpu_encoder_helper_phys_cleanup
Dmitry Baryshkov
dmitry.baryshkov at linaro.org
Wed Jan 17 20:49:48 UTC 2024
On Wed, 17 Jan 2024 at 21:41, Abhinav Kumar <quic_abhinavk at quicinc.com> wrote:
>
> The commit 8b45a26f2ba9 ("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: Dan Carpenter <dan.carpenter at linaro.org>
> Fixes: ae4d721ce100 ("drm/msm/dpu: add an API to reset the encoder related hw blocks")
> Signed-off-by: Abhinav Kumar <quic_abhinavk at quicinc.com>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
--
With best wishes
Dmitry
More information about the dri-devel
mailing list