diff options
author | Sean Paul <seanpaul@chromium.org> | 2016-09-16 21:22:03 +0300 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2016-09-21 16:55:53 +0300 |
commit | 8c763c9b1072c91aac90e5bc0a2ac2220a6980d7 (patch) | |
tree | 7156b9d8311364bca44999517bac8074cc7602b8 /drivers/gpu/drm/rockchip | |
parent | d47a7246bb5f2a36f7c26672966e9febeb78bc82 (diff) | |
download | linux-8c763c9b1072c91aac90e5bc0a2ac2220a6980d7.tar.xz |
drm/rockchip: Balance irq refcount on failure
If create_crtc fails in vop bind, ensure the irq refcount is zeroed
back out before exiting.
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/rockchip')
-rw-r--r-- | drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 37e6ba92b8fa..c7eba305c488 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -1547,11 +1547,15 @@ static int vop_bind(struct device *dev, struct device *master, void *data) ret = vop_create_crtc(vop); if (ret) - return ret; + goto err_enable_irq; pm_runtime_enable(&pdev->dev); return 0; + +err_enable_irq: + enable_irq(vop->irq); /* To balance out the disable_irq above */ + return ret; } static void vop_unbind(struct device *dev, struct device *master, void *data) |