Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd8f894e authored by Andy Walls's avatar Andy Walls Committed by Mauro Carvalho Chehab
Browse files

V4L/DVB (10218): cx23885: Fix Oops for mixed install of analog and digital only cards



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: default avatarMark Jenks <mjenks1968@gmail.com>
Tested-by: default avatarMark Jenks <mjenks1968@gmail.com>
Signed-off-by: default avatarMark Jenks <mjenks1968@gmail.com>
Signed-off-by: default avatarAndy Walls <awalls@radix.net>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 0f3559ef
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1586,7 +1586,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;
		}
+3 −2
Original line number Diff line number Diff line
@@ -730,7 +730,8 @@ 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;
		}