diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-04-02 08:42:24 +0300 |
---|---|---|
committer | Liviu Dudau <Liviu.Dudau@arm.com> | 2016-04-04 10:11:33 +0100 |
commit | 69c2565a3cca3d79572941d62165af7805d72762 (patch) | |
tree | 500263f2efda582c9c55922fcfd661e0add769b6 /drivers | |
parent | 61a6dcd77af74e925bb301475fb6e43d8fe72da8 (diff) | |
download | linux-69c2565a3cca3d79572941d62165af7805d72762.tar.bz2 |
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 <dan.carpenter@oracle.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/arm/hdlcd_drv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c index 734849fafe28..3ac1ae4d8caf 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); |