]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm/dpu: don't access mode pointer before it is set
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Mon, 2 May 2022 08:24:20 +0000 (11:24 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 6 May 2022 23:10:34 +0000 (02:10 +0300)
commit4f36e8e737b0b771377f2263431733d20509724c
tree8b223a2c63b94129eb9b781cf3541d00cce3c553
parent3b82f79279edc6993d240bb879e23c9524afdbf6
drm/msm/dpu: don't access mode pointer before it is set

Move the initializer for the mode variable to the declaration point to
remove unitialized variable access from the DEBUG_DPU macro. This fixes
the following warning:

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c:250:37: note: initialize the variable 'mode' to silence this warning

Fixes: bceb6e7b768b ("drm/msm/dpu: introduce the dpu_encoder_phys_* for writeback")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/484346/
Link: https://lore.kernel.org/r/20220502082420.48409-1-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_wb.c