The functions dpu_encoder_phys_foo_init() can not return NULL. Replace
corresponding IS_ERR_OR_NULL() checks with just IS_ERR().

Signed-off-by: Dmitry Baryshkov <dmitry.barysh...@linaro.org>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index 52516eb20cb8..07de0c0506d3 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -2144,10 +2144,10 @@ static int dpu_encoder_virt_add_phys_encs(
        if (disp_info->capabilities & MSM_DISPLAY_CAP_VID_MODE) {
                enc = dpu_encoder_phys_vid_init(params);
 
-               if (IS_ERR_OR_NULL(enc)) {
+               if (IS_ERR(enc)) {
                        DPU_ERROR_ENC(dpu_enc, "failed to init vid enc: %ld\n",
                                PTR_ERR(enc));
-                       return enc == NULL ? -EINVAL : PTR_ERR(enc);
+                       return PTR_ERR(enc);
                }
 
                dpu_enc->phys_encs[dpu_enc->num_phys_encs] = enc;
@@ -2157,10 +2157,10 @@ static int dpu_encoder_virt_add_phys_encs(
        if (disp_info->capabilities & MSM_DISPLAY_CAP_CMD_MODE) {
                enc = dpu_encoder_phys_cmd_init(params);
 
-               if (IS_ERR_OR_NULL(enc)) {
+               if (IS_ERR(enc)) {
                        DPU_ERROR_ENC(dpu_enc, "failed to init cmd enc: %ld\n",
                                PTR_ERR(enc));
-                       return enc == NULL ? -EINVAL : PTR_ERR(enc);
+                       return PTR_ERR(enc);
                }
 
                dpu_enc->phys_encs[dpu_enc->num_phys_encs] = enc;
@@ -2170,10 +2170,10 @@ static int dpu_encoder_virt_add_phys_encs(
        if (disp_info->intf_type == DRM_MODE_ENCODER_VIRTUAL) {
                enc = dpu_encoder_phys_wb_init(params);
 
-               if (IS_ERR_OR_NULL(enc)) {
+               if (IS_ERR(enc)) {
                        DPU_ERROR_ENC(dpu_enc, "failed to init wb enc: %ld\n",
                                        PTR_ERR(enc));
-                       return enc == NULL ? -EINVAL : PTR_ERR(enc);
+                       return PTR_ERR(enc);
                }
 
                dpu_enc->phys_encs[dpu_enc->num_phys_encs] = enc;
-- 
2.35.1

Reply via email to