[12/20] media: soc_camera: Fix error reporting in expbuf
Commit Message
From: Hans Verkuil <hans.verkuil@cisco.com>
Remove unnecessary check and fix the error code for vb1 drivers.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Rob Taylor <rob.taylor@codethink.co.uk>
---
drivers/media/platform/soc_camera/soc_camera.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
@@ -470,14 +470,10 @@ static int soc_camera_expbuf(struct file *file, void *priv,
struct soc_camera_device *icd = file->private_data;
struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
- if (icd->streamer != file)
- return -EBUSY;
-
/* videobuf2 only */
if (ici->ops->init_videobuf)
- return -EINVAL;
- else
- return vb2_expbuf(&icd->vb2_vidq, p);
+ return -ENOTTY;
+ return vb2_expbuf(&icd->vb2_vidq, p);
}
/* Always entered with .host_lock held */