media: rcar-vin: Allow interrupting lock when trying to open the video device

The user should be allowed to break waiting for the lock when opening
the video device.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
Niklas Söderlund 2019-06-12 19:45:42 -04:00 committed by Mauro Carvalho Chehab
parent b2ef816c3d
commit 11492ee7cb

View File

@ -821,7 +821,9 @@ static int rvin_open(struct file *file)
struct rvin_dev *vin = video_drvdata(file); struct rvin_dev *vin = video_drvdata(file);
int ret; int ret;
mutex_lock(&vin->lock); ret = mutex_lock_interruptible(&vin->lock);
if (ret)
return ret;
file->private_data = vin; file->private_data = vin;