aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSteven Toth <stoth@hauppauge.com>2008-04-02 00:10:40 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-04-24 13:09:43 -0400
commit9c26de555dd3c2cb9833b4d324150aa6b5547b91 (patch)
tree0a4a3ad4be8627c369a4e27921567942a6d0d519 /drivers
parentc32d4d7510ae4da4e83bbd6e6471b04e9c9108ea (diff)
V4L/DVB (7624): Avoid an oops if the board is not fully defined
Avoid an oops if the board is not fully defined. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/video/au0828/au0828-core.c1
-rw-r--r--drivers/media/video/au0828/au0828-dvb.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/video/au0828/au0828-core.c b/drivers/media/video/au0828/au0828-core.c
index f5df99ea3b9f..a3410fc8f5f9 100644
--- a/drivers/media/video/au0828/au0828-core.c
+++ b/drivers/media/video/au0828/au0828-core.c
@@ -217,6 +217,7 @@ static int au0828_usb_probe (struct usb_interface *interface,
217 au0828_dvb_register(dev); 217 au0828_dvb_register(dev);
218 218
219 _info("Registered device AU0828 [%s]\n", 219 _info("Registered device AU0828 [%s]\n",
220 au0828_boards[dev->board].name == NULL ? "Unset" :
220 au0828_boards[dev->board].name); 221 au0828_boards[dev->board].name);
221 222
222 return 0; 223 return 0;
diff --git a/drivers/media/video/au0828/au0828-dvb.c b/drivers/media/video/au0828/au0828-dvb.c
index 3c8a29eafc2d..ecc08a8e31ca 100644
--- a/drivers/media/video/au0828/au0828-dvb.c
+++ b/drivers/media/video/au0828/au0828-dvb.c
@@ -57,6 +57,9 @@ static void urb_completion(struct urb *purb)
57 struct au0828_dev *dev = purb->context; 57 struct au0828_dev *dev = purb->context;
58 int ptype = usb_pipetype(purb->pipe); 58 int ptype = usb_pipetype(purb->pipe);
59 59
60 if (!dev)
61 return;
62
60 if (dev->urb_streaming == 0) 63 if (dev->urb_streaming == 0)
61 return; 64 return;
62 65
@@ -310,6 +313,9 @@ void au0828_dvb_unregister(struct au0828_dev *dev)
310{ 313{
311 struct au0828_dvb *dvb = &dev->dvb; 314 struct au0828_dvb *dvb = &dev->dvb;
312 315
316 if(dvb->frontend == NULL)
317 return;
318
313 dvb_net_release(&dvb->net); 319 dvb_net_release(&dvb->net);
314 dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem); 320 dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem);
315 dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw); 321 dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw);