diff options
author | Steven Toth <stoth@hauppauge.com> | 2008-04-01 21:10:40 -0400 |
---|---|---|
committer | Steven Toth <stoth@hauppauge.com> | 2008-04-01 21:10:40 -0400 |
commit | c6b588f3025b68a7ca872fc58abe1bd2ff6198d8 (patch) | |
tree | 581057db1b29fd26fc5cef25af6dffc876939ed0 /linux/drivers | |
parent | fb07179eec70f621e5b43d6235f166b3fa081621 (diff) | |
download | mediapointer-dvb-s2-c6b588f3025b68a7ca872fc58abe1bd2ff6198d8.tar.gz mediapointer-dvb-s2-c6b588f3025b68a7ca872fc58abe1bd2ff6198d8.tar.bz2 |
Avoid an oops if the board is not fully defined.
From: Steven Toth <stoth@hauppauge.com>
Avoid an oops if the board is not fully defined.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/au0828/au0828-core.c | 1 | ||||
-rw-r--r-- | linux/drivers/media/video/au0828/au0828-dvb.c | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/linux/drivers/media/video/au0828/au0828-core.c b/linux/drivers/media/video/au0828/au0828-core.c index de32d15f6..d4d8ac369 100644 --- a/linux/drivers/media/video/au0828/au0828-core.c +++ b/linux/drivers/media/video/au0828/au0828-core.c @@ -244,6 +244,7 @@ static int au0828_usb_probe (struct usb_interface *interface, au0828_dvb_register(dev); _info("Registered device AU0828 [%s]\n", + au0828_boards[dev->board].name == NULL ? "Unset" : au0828_boards[dev->board].name); return 0; diff --git a/linux/drivers/media/video/au0828/au0828-dvb.c b/linux/drivers/media/video/au0828/au0828-dvb.c index 73a6da763..bb9f3db5e 100644 --- a/linux/drivers/media/video/au0828/au0828-dvb.c +++ b/linux/drivers/media/video/au0828/au0828-dvb.c @@ -62,6 +62,9 @@ static void urb_completion(struct urb *purb) struct au0828_dev *dev = purb->context; int ptype = usb_pipetype(purb->pipe); + if (!dev) + return; + if (dev->urb_streaming == 0) return; @@ -334,6 +337,9 @@ void au0828_dvb_unregister(struct au0828_dev *dev) { struct au0828_dvb *dvb = &dev->dvb; + if(dvb->frontend == NULL) + return; + dvb_net_release(&dvb->net); dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem); dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw); |