Skip to content

Commit

Permalink
V4L/DVB (6188): Avoid a NULL pointer dereference during mpeg_open()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steven Toth authored and Mauro Carvalho Chehab committed Sep 14, 2007
1 parent 4730d3a commit 48200ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/cx88/cx88-mpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,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;
}

Expand Down

0 comments on commit 48200ba

Please sign in to comment.