Message ID | 20200613230432.13025-1-wu000273@umn.edu (mailing list archive) |
---|---|
State | Mainlined |
Commit | 410822037cc909c4bef845a71e9cac92b75591d2 |
Delegated to: | Kieran Bingham |
Headers | show |
Series | media: rcar-vin: Fix a reference count leak. | expand |
diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c index f421e2584875..06808be35f98 100644 --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c @@ -835,8 +835,10 @@ static int rvin_open(struct file *file) int ret; ret = pm_runtime_get_sync(vin->dev); - if (ret < 0) + if (ret < 0) { + pm_runtime_put_noidle(vin->dev); return ret; + } ret = mutex_lock_interruptible(&vin->lock); if (ret)