Commit 9c26de55 authored by Steven Toth's avatar Steven Toth Committed by Mauro Carvalho Chehab

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: default avatarSteven Toth <stoth@hauppauge.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent c32d4d75
...@@ -217,6 +217,7 @@ static int au0828_usb_probe (struct usb_interface *interface, ...@@ -217,6 +217,7 @@ static int au0828_usb_probe (struct usb_interface *interface,
au0828_dvb_register(dev); au0828_dvb_register(dev);
_info("Registered device AU0828 [%s]\n", _info("Registered device AU0828 [%s]\n",
au0828_boards[dev->board].name == NULL ? "Unset" :
au0828_boards[dev->board].name); au0828_boards[dev->board].name);
return 0; return 0;
......
...@@ -57,6 +57,9 @@ static void urb_completion(struct urb *purb) ...@@ -57,6 +57,9 @@ static void urb_completion(struct urb *purb)
struct au0828_dev *dev = purb->context; struct au0828_dev *dev = purb->context;
int ptype = usb_pipetype(purb->pipe); int ptype = usb_pipetype(purb->pipe);
if (!dev)
return;
if (dev->urb_streaming == 0) if (dev->urb_streaming == 0)
return; return;
...@@ -310,6 +313,9 @@ void au0828_dvb_unregister(struct au0828_dev *dev) ...@@ -310,6 +313,9 @@ void au0828_dvb_unregister(struct au0828_dev *dev)
{ {
struct au0828_dvb *dvb = &dev->dvb; struct au0828_dvb *dvb = &dev->dvb;
if(dvb->frontend == NULL)
return;
dvb_net_release(&dvb->net); 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_mem);
dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw); dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_hw);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment