summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/mxc/capture/mxc_v4l2_capture.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
index 56cc875d2da8..308f949d44ad 100644
--- a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
+++ b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
@@ -1374,6 +1374,12 @@ static int mxc_v4l_open(struct file *file)
return -EBADF;
}
+ if (cam->sensor == NULL ||
+ cam->sensor->type != v4l2_int_type_slave) {
+ pr_err("ERROR: v4l2 capture: slave not found!\n");
+ return -EAGAIN;
+ }
+
down(&cam->busy_lock);
err = 0;
if (signal_pending(current))