diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/s2255drv.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c index ac9c40cf5835..1f9a49e054a8 100644 --- a/drivers/media/video/s2255drv.c +++ b/drivers/media/video/s2255drv.c | |||
@@ -1716,11 +1716,15 @@ static int s2255_open(struct file *file) | |||
1716 | dprintk(1, "s2255: open called (dev=%s)\n", | 1716 | dprintk(1, "s2255: open called (dev=%s)\n", |
1717 | video_device_node_name(vdev)); | 1717 | video_device_node_name(vdev)); |
1718 | 1718 | ||
1719 | for (i = 0; i < MAX_CHANNELS; i++) | 1719 | for (i = 0; i < MAX_CHANNELS; i++) { |
1720 | if (&dev->vdev[i] == vdev) { | 1720 | if (&dev->vdev[i] == vdev) { |
1721 | cur_channel = i; | 1721 | cur_channel = i; |
1722 | break; | 1722 | break; |
1723 | } | 1723 | } |
1724 | } | ||
1725 | if (i == MAX_CHANNELS) | ||
1726 | return -ENODEV; | ||
1727 | |||
1724 | /* | 1728 | /* |
1725 | * open lock necessary to prevent multiple instances | 1729 | * open lock necessary to prevent multiple instances |
1726 | * of v4l-conf (or other programs) from simultaneously | 1730 | * of v4l-conf (or other programs) from simultaneously |