Skip to content

Commit aa47272

Browse files
Chen Taorobclark
authored andcommitted
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: 25fdd59 ("drm/msm: Add SDM845 DPU support") Signed-off-by: Chen Tao <[email protected]> Signed-off-by: Rob Clark <[email protected]>
1 parent 177d381 commit aa47272

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2187,7 +2187,7 @@ struct drm_encoder *dpu_encoder_init(struct drm_device *dev,
21872187

21882188
dpu_enc = devm_kzalloc(dev->dev, sizeof(*dpu_enc), GFP_KERNEL);
21892189
if (!dpu_enc)
2190-
return ERR_PTR(ENOMEM);
2190+
return ERR_PTR(-ENOMEM);
21912191

21922192
rc = drm_encoder_init(dev, &dpu_enc->base, &dpu_encoder_funcs,
21932193
drm_enc_mode, NULL);

0 commit comments

Comments
 (0)