From: Dan Carpenter Date: Sat, 2 Apr 2016 05:42:24 +0000 (+0300) Subject: drm: ARM HDLCD - fix an error code X-Git-Tag: v4.14-rc1~3473^2~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69c2565a3cca3d79572941d62165af7805d72762;p=platform%2Fkernel%2Flinux-rpi.git drm: ARM HDLCD - fix an error code We accidentally return PTR_ERR(NULL) which is success instead of a negative error code. Fixes: 879e40bea6f2 ('drm: ARM HDLCD - get rid of devm_clk_put()') Signed-off-by: Dan Carpenter Signed-off-by: Liviu Dudau --- diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c index 734849f..3ac1ae4 100644 --- a/drivers/gpu/drm/arm/hdlcd_drv.c +++ b/drivers/gpu/drm/arm/hdlcd_drv.c @@ -55,8 +55,9 @@ static int hdlcd_load(struct drm_device *drm, unsigned long flags) hdlcd->mmio = devm_ioremap_resource(drm->dev, res); if (IS_ERR(hdlcd->mmio)) { DRM_ERROR("failed to map control registers area\n"); + ret = PTR_ERR(hdlcd->mmio); hdlcd->mmio = NULL; - return PTR_ERR(hdlcd->mmio); + return ret; } version = hdlcd_read(hdlcd, HDLCD_REG_VERSION);