[PATCH] drm/rockchip: Balance irq refcount on failure
Sean Paul
seanpaul at chromium.org
Fri Sep 16 11:22:03 PDT 2016
If create_crtc fails in vop bind, ensure the irq refcount is zeroed
back out before exiting.
Signed-off-by: Sean Paul <seanpaul at chromium.org>
---
drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index 57650c9..131ae0f 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -1551,11 +1551,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)
--
2.8.0.rc3.226.g39d4020
More information about the Linux-rockchip
mailing list