]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/rockchip: Balance irq refcount on failure
authorSean Paul <seanpaul@chromium.org>
Fri, 16 Sep 2016 18:22:03 +0000 (14:22 -0400)
committerSean Paul <seanpaul@chromium.org>
Wed, 21 Sep 2016 13:55:53 +0000 (06:55 -0700)
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>
drivers/gpu/drm/rockchip/rockchip_drm_vop.c

index 37e6ba92b8fa07dd20e8e05270b2c866273fafce..c7eba305c48830b225d3927185ad849dac193d07 100644 (file)
@@ -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)