This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/v4l-dvb.git tree:
Subject: V4L/DVB: s2255drv: return if vdev not found Author: Dan Carpenter <[email protected]> Date: Wed May 5 03:01:30 2010 -0300 The original code didn't handle the case where vdev was not found so I added a check for that. Signed-off-by: Dan Carpenter <[email protected]> Cc: [email protected] Signed-off-by: Mauro Carvalho Chehab <[email protected]> drivers/media/video/s2255drv.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) --- http://git.linuxtv.org/v4l-dvb.git?a=commitdiff;h=a4f0ebe290370328442bddad01a5357c74433e28 diff --git a/drivers/media/video/s2255drv.c b/drivers/media/video/s2255drv.c index beef9cb..99ca1f3 100644 --- a/drivers/media/video/s2255drv.c +++ b/drivers/media/video/s2255drv.c @@ -1715,11 +1715,15 @@ static int s2255_open(struct file *file) dprintk(1, "s2255: open called (dev=%s)\n", video_device_node_name(vdev)); - for (i = 0; i < MAX_CHANNELS; i++) + for (i = 0; i < MAX_CHANNELS; i++) { if (&dev->vdev[i] == vdev) { cur_channel = i; break; } + } + if (i == MAX_CHANNELS) + return -ENODEV; + /* * open lock necessary to prevent multiple instances * of v4l-conf (or other programs) from simultaneously _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
