Skip to content

Commit 4cf43e0

Browse files
committed
Merge branch 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld into drm-fixes
arm hdlcd fix. * 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld: drm: ARM HDLCD - fix an error code drm: ARM HDLCD - get rid of devm_clk_put()
2 parents 915e846 + 69c2565 commit 4cf43e0

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

drivers/gpu/drm/arm/hdlcd_drv.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,13 @@ static int hdlcd_load(struct drm_device *drm, unsigned long flags)
5757
DRM_ERROR("failed to map control registers area\n");
5858
ret = PTR_ERR(hdlcd->mmio);
5959
hdlcd->mmio = NULL;
60-
goto fail;
60+
return ret;
6161
}
6262

6363
version = hdlcd_read(hdlcd, HDLCD_REG_VERSION);
6464
if ((version & HDLCD_PRODUCT_MASK) != HDLCD_PRODUCT_ID) {
6565
DRM_ERROR("unknown product id: 0x%x\n", version);
66-
ret = -EINVAL;
67-
goto fail;
66+
return -EINVAL;
6867
}
6968
DRM_INFO("found ARM HDLCD version r%dp%d\n",
7069
(version & HDLCD_VERSION_MAJOR_MASK) >> 8,
@@ -73,7 +72,7 @@ static int hdlcd_load(struct drm_device *drm, unsigned long flags)
7372
/* Get the optional framebuffer memory resource */
7473
ret = of_reserved_mem_device_init(drm->dev);
7574
if (ret && ret != -ENODEV)
76-
goto fail;
75+
return ret;
7776

7877
ret = dma_set_mask_and_coherent(drm->dev, DMA_BIT_MASK(32));
7978
if (ret)
@@ -101,8 +100,6 @@ static int hdlcd_load(struct drm_device *drm, unsigned long flags)
101100
drm_crtc_cleanup(&hdlcd->crtc);
102101
setup_fail:
103102
of_reserved_mem_device_release(drm->dev);
104-
fail:
105-
devm_clk_put(drm->dev, hdlcd->clk);
106103

107104
return ret;
108105
}
@@ -412,7 +409,6 @@ static int hdlcd_drm_bind(struct device *dev)
412409
pm_runtime_put_sync(drm->dev);
413410
pm_runtime_disable(drm->dev);
414411
of_reserved_mem_device_release(drm->dev);
415-
devm_clk_put(dev, hdlcd->clk);
416412
err_free:
417413
drm_dev_unref(drm);
418414

@@ -436,10 +432,6 @@ static void hdlcd_drm_unbind(struct device *dev)
436432
pm_runtime_put_sync(drm->dev);
437433
pm_runtime_disable(drm->dev);
438434
of_reserved_mem_device_release(drm->dev);
439-
if (!IS_ERR(hdlcd->clk)) {
440-
devm_clk_put(drm->dev, hdlcd->clk);
441-
hdlcd->clk = NULL;
442-
}
443435
drm_mode_config_cleanup(drm);
444436
drm_dev_unregister(drm);
445437
drm_dev_unref(drm);

0 commit comments

Comments
 (0)