diff options
author | Chen Tao <chentao107@huawei.com> | 2020-06-08 03:48:59 +0200 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2020-06-12 05:07:21 +0200 |
commit | aa472721c8dbe1713cf510f56ffbc56ae9e14247 (patch) | |
tree | 5256119fe4252327c7564889a1063246d9651d7b /drivers/gpu | |
parent | drm/msm: fix potential memleak in error branch (diff) | |
download | linux-aa472721c8dbe1713cf510f56ffbc56ae9e14247.tar.xz linux-aa472721c8dbe1713cf510f56ffbc56ae9e14247.zip |
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@huawei.com>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 9f8de773ed59..30254741e6ef 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -2187,7 +2187,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); |