Message ID | 7049439982d152c6fba7d46fe8c98ca74c0f7875.1620207353.git.mchehab+huawei@kernel.org |
---|---|
State | Accepted |
Commit | 6e8b1526db164c9d4b9dacfb9bc48e365d7c4860 |
Headers | show |
Series | [01/25] staging: media: rkvdec: fix pm_runtime_get_sync() usage count | expand |
diff --git a/drivers/media/platform/sh_vou.c b/drivers/media/platform/sh_vou.c index 4ac48441f22c..ca4310e26c49 100644 --- a/drivers/media/platform/sh_vou.c +++ b/drivers/media/platform/sh_vou.c @@ -1133,7 +1133,11 @@ static int sh_vou_open(struct file *file) if (v4l2_fh_is_singular_file(file) && vou_dev->status == SH_VOU_INITIALISING) { /* First open */ - pm_runtime_get_sync(vou_dev->v4l2_dev.dev); + err = pm_runtime_resume_and_get(vou_dev->v4l2_dev.dev); + if (err < 0) { + v4l2_fh_release(file); + goto done_open; + } err = sh_vou_hw_init(vou_dev); if (err < 0) { pm_runtime_put(vou_dev->v4l2_dev.dev);