]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm/dpu: fix error handling in dpu_rm_init
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 21 Jan 2022 21:06:17 +0000 (00:06 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 18 Feb 2022 17:15:11 +0000 (20:15 +0300)
commitc12179f8e6d3767135c52252077a9100d070276c
tree608be15ed9eb907f77389cb8bb4f0ca0c3c3fbeb
parent37e05db9bec076da56429ed96f542a5a4d1046e3
drm/msm/dpu: fix error handling in dpu_rm_init

Using IS_ERR_OR_NULL() together with PTR_ERR() is a typical mistake. If
the value is NULL, then the function will return 0 instead of a proper
return code. Moreover none of dpu_hw_*_init() functions can return NULL.
So, replace all dpu_rm_init()'s IS_ERR_OR_NULL() calls with IS_ERR().

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Link: https://lore.kernel.org/r/20220121210618.3482550-6-dmitry.baryshkov@linaro.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c