summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2007-09-06 21:48:35 -0400
committerSteven Toth <stoth@hauppauge.com>2007-09-06 21:48:35 -0400
commit1b5378ef402120ff13f344edaf8bca4761f82ee5 (patch)
tree1288229843309cad00fcbff3ff08fb8636ad26c7 /linux
parent5c425b0ed1e98e581a7f9cb63d16225aca0b2987 (diff)
downloadmediapointer-dvb-s2-1b5378ef402120ff13f344edaf8bca4761f82ee5.tar.gz
mediapointer-dvb-s2-1b5378ef402120ff13f344edaf8bca4761f82ee5.tar.bz2
Avoid a NULL pointer dereference during mpeg_open()
From: Steven Toth <stoth@hauppauge.com> 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>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/cx88/cx88-mpeg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c
index effac1619..f3447f1d7 100644
--- a/linux/drivers/media/video/cx88/cx88-mpeg.c
+++ b/linux/drivers/media/video/cx88/cx88-mpeg.c
@@ -637,7 +637,7 @@ struct cx8802_dev * cx8802_get_device(struct inode *inode)
list_for_each(list,&cx8802_devlist) {
h = list_entry(list, struct cx8802_dev, devlist);
- if (h->mpeg_dev->minor == minor)
+ if (h->mpeg_dev && h->mpeg_dev->minor == minor)
return h;
}