]> 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)
commit3c9dce5e52119cba3fd88d4c03f6f561ac1b8dcf
tree608be15ed9eb907f77389cb8bb4f0ca0c3c3fbeb
parent5360ba551957bd2c31d4691918904964d388f5d6
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