diff options
author | Andy Walls <awalls@radix.net> | 2009-01-09 20:59:27 -0500 |
---|---|---|
committer | Andy Walls <awalls@radix.net> | 2009-01-09 20:59:27 -0500 |
commit | 3ba27c900cccb378926138315d78e418be98bd37 (patch) | |
tree | 1abf58286dd9c9d0ccfdfcb7f2ba303ba207cb92 /linux/drivers/media/video/cx23885 | |
parent | 400f61f9a15652c5702f073ee0bab50103ef0500 (diff) | |
download | mediapointer-dvb-s2-3ba27c900cccb378926138315d78e418be98bd37.tar.gz mediapointer-dvb-s2-3ba27c900cccb378926138315d78e418be98bd37.tar.bz2 |
cx23885: Fix Oops for mixed install of analog and digital only cards
From: Andy Walls <awalls@radix.net>
Analog support for HVR-1250 has not been completed, but does exist for
the HVR-1800.
Since both cards use the same driver, it tries to create the analog
dev for both devices, which is not possible.
This causes a NULL error to show up in video_open and mpeg_open.
-Mark
Iterations through the cx23885_devlist must check for NULL
pointers as some supported devices only have DVB support at the moment.
Mark Jenks encoutered an Oops in a system with both an HVR-1250 and HVR-1800
installed.
-Andy
Reported-by: Mark Jenks <mjenks1968@gmail.com>
Priority: normal
Tested-by: Mark Jenks <mjenks1968@gmail.com>
Signed-off-by: Mark Jenks <mjenks1968@gmail.com>
Signed-off-by: Andy Walls <awalls@radix.net>
Diffstat (limited to 'linux/drivers/media/video/cx23885')
-rw-r--r-- | linux/drivers/media/video/cx23885/cx23885-417.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/cx23885/cx23885-video.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/linux/drivers/media/video/cx23885/cx23885-417.c b/linux/drivers/media/video/cx23885/cx23885-417.c index 52f6824ff..0766a97a0 100644 --- a/linux/drivers/media/video/cx23885/cx23885-417.c +++ b/linux/drivers/media/video/cx23885/cx23885-417.c @@ -1594,7 +1594,8 @@ static int mpeg_open(struct file *file) lock_kernel(); list_for_each(list, &cx23885_devlist) { h = list_entry(list, struct cx23885_dev, devlist); - if (h->v4l_device->minor == minor) { + if (h->v4l_device && + h->v4l_device->minor == minor) { dev = h; break; } diff --git a/linux/drivers/media/video/cx23885/cx23885-video.c b/linux/drivers/media/video/cx23885/cx23885-video.c index 838b3ac5a..09291888d 100644 --- a/linux/drivers/media/video/cx23885/cx23885-video.c +++ b/linux/drivers/media/video/cx23885/cx23885-video.c @@ -786,12 +786,13 @@ static int video_open(struct file *file) lock_kernel(); list_for_each(list, &cx23885_devlist) { h = list_entry(list, struct cx23885_dev, devlist); - if (h->video_dev->minor == minor) { + if (h->video_dev && + h->video_dev->minor == minor) { dev = h; type = V4L2_BUF_TYPE_VIDEO_CAPTURE; } if (h->vbi_dev && - h->vbi_dev->minor == minor) { + h->vbi_dev->minor == minor) { dev = h; type = V4L2_BUF_TYPE_VBI_CAPTURE; } |