mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
drm/msm/dpu: replace IS_ERR_OR_NULL with IS_ERR during DSC 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 dpu_hw_dsc_init() can not return NULL. Replace the IS_ERR_OR_NULL() call with IS_ERR(). This follows the commit740828c73a("drm/msm/dpu: fix error handling in dpu_rm_init"), which removed IS_ERR_OR_NULL() from RM init code, but then the commitf2803ee91a("drm/msm/disp/dpu1: Add DSC support in RM") added it for DSC init. Suggested-by: Marijn Suijten <marijn.suijten@somainline.org> Reviewed-by: Marijn Suijten <marijn.suijten@somainline.org> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/538203/ Link: https://lore.kernel.org/r/20230519234025.2864377-2-dmitry.baryshkov@linaro.org Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
@@ -247,7 +247,7 @@ int dpu_rm_init(struct dpu_rm *rm,
|
||||
const struct dpu_dsc_cfg *dsc = &cat->dsc[i];
|
||||
|
||||
hw = dpu_hw_dsc_init(dsc, mmio);
|
||||
if (IS_ERR_OR_NULL(hw)) {
|
||||
if (IS_ERR(hw)) {
|
||||
rc = PTR_ERR(hw);
|
||||
DPU_ERROR("failed dsc object creation: err %d\n", rc);
|
||||
goto fail;
|
||||
|
||||
Reference in New Issue
Block a user