]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - drivers/media/platform/exynos4-is/fimc-capture.c
media: fimc-capture: Fix runtime PM imbalance on error
[mirror_ubuntu-hirsute-kernel.git] / drivers / media / platform / exynos4-is / fimc-capture.c
index 705f182330ca4637cb383bc7b9ff618f8776c4a7..dd33b888971fb974c175e70d39e7c4070eb3a93a 100644 (file)
@@ -478,8 +478,10 @@ static int fimc_capture_open(struct file *file)
 
        set_bit(ST_CAPT_BUSY, &fimc->state);
        ret = pm_runtime_get_sync(&fimc->pdev->dev);
-       if (ret < 0)
+       if (ret < 0) {
+               pm_runtime_put_sync(&fimc->pdev->dev);
                goto unlock;
+       }
 
        ret = v4l2_fh_open(file);
        if (ret) {