summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/omap2/omapfb/dss/venc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/fbdev/omap2/omapfb/dss/venc.c')
-rw-r--r--drivers/video/fbdev/omap2/omapfb/dss/venc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/venc.c b/drivers/video/fbdev/omap2/omapfb/dss/venc.c
index d5404d56c922..0b0ad20afd63 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/venc.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/venc.c
@@ -348,8 +348,11 @@ static int venc_runtime_get(void)
DSSDBG("venc_runtime_get\n");
r = pm_runtime_get_sync(&venc.pdev->dev);
- WARN_ON(r < 0);
- return r < 0 ? r : 0;
+ if (WARN_ON(r < 0)) {
+ pm_runtime_put_sync(&venc.pdev->dev);
+ return r;
+ }
+ return 0;
}
static void venc_runtime_put(void)