From 8c763c9b1072c91aac90e5bc0a2ac2220a6980d7 Mon Sep 17 00:00:00 2001 From: Sean Paul Date: Fri, 16 Sep 2016 14:22:03 -0400 Subject: [PATCH] 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 Signed-off-by: Sean Paul --- 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 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) -- 2.20.1