V4L/DVB (8005): Fix OOPS if frontend is null
authorMauro Carvalho Chehab <mchehab@infradead.org>
Sat, 7 Jun 2008 18:54:10 +0000 (15:54 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 26 Jun 2008 18:58:41 +0000 (15:58 -0300)
Thanks to timf <timf@iinet.net.au> and Mike Galbraith <efault@gmx.de> to report
this issue.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/saa7134/saa7134-dvb.c

index 469f93aac0083a1e049cb55bc27ed985ca31596d..726f01ccedf047fbdd3bcc3e967d5790580bb4d5 100644 (file)
@@ -1338,7 +1338,8 @@ static int dvb_init(struct saa7134_dev *dev)
        return ret;
 
 dettach_frontend:
-       dvb_frontend_detach(dev->dvb.frontend);
+       if (dev->dvb.frontend)
+               dvb_frontend_detach(dev->dvb.frontend);
        dev->dvb.frontend = NULL;
 
        return -1;