diff options
author | Steven Toth <stoth@hauppauge.com> | 2007-09-06 21:48:35 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-09-14 12:13:42 -0400 |
commit | 48200baeab95fd39a7f4c4f3536c7142a64ac335 (patch) | |
tree | c08fb3e4dca3d62b6cd1559797f0b1f05b440ad5 /drivers/media/video/cx88/cx88-mpeg.c | |
parent | 4730d3af625b532e3df5f091b5c8edb08f512fbf (diff) |
V4L/DVB (6188): Avoid a NULL pointer dereference during mpeg_open()
Bug: With a hardware encoder board installed as cx88[1] and a
non-encoder boards installed as cx88[0], an OOPS is generated
during cx8802_get_device() called from mpeg_open().
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-mpeg.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-mpeg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c index 317a2a3f9cc1..da7a6b591a67 100644 --- a/drivers/media/video/cx88/cx88-mpeg.c +++ b/drivers/media/video/cx88/cx88-mpeg.c | |||
@@ -580,7 +580,7 @@ struct cx8802_dev * cx8802_get_device(struct inode *inode) | |||
580 | 580 | ||
581 | list_for_each(list,&cx8802_devlist) { | 581 | list_for_each(list,&cx8802_devlist) { |
582 | h = list_entry(list, struct cx8802_dev, devlist); | 582 | h = list_entry(list, struct cx8802_dev, devlist); |
583 | if (h->mpeg_dev->minor == minor) | 583 | if (h->mpeg_dev && h->mpeg_dev->minor == minor) |
584 | return h; | 584 | return h; |
585 | } | 585 | } |
586 | 586 | ||