[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200608014859.120021-1-chentao107@huawei.com>
Date: Mon, 8 Jun 2020 09:48:59 +0800
From: Chen Tao <chentao107@...wei.com>
To: <sean@...rly.run>, <airlied@...ux.ie>, <daniel@...ll.ch>
CC: <ddavenport@...omium.org>, <zhengbin13@...wei.com>,
<sam@...nborg.org>, <kalyan_t@...eaurora.org>,
<linux-arm-msm@...r.kernel.org>, <dri-devel@...ts.freedesktop.org>,
<freedreno@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>,
<chentao107@...wei.com>
Subject: [PATCH] drm/msm/dpu: fix error return code in dpu_encoder_init
Fix to return negative error code -ENOMEM with the use of
ERR_PTR from dpu_encoder_init.
Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
Signed-off-by: Chen Tao <chentao107@...wei.com>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index a1b79ee2bd9d..a2f6b688a976 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -2173,7 +2173,7 @@ struct drm_encoder *dpu_encoder_init(struct drm_device *dev,
dpu_enc = devm_kzalloc(dev->dev, sizeof(*dpu_enc), GFP_KERNEL);
if (!dpu_enc)
- return ERR_PTR(ENOMEM);
+ return ERR_PTR(-ENOMEM);
rc = drm_encoder_init(dev, &dpu_enc->base, &dpu_encoder_funcs,
drm_enc_mode, NULL);
--
2.22.0
Powered by blists - more mailing lists