Browse Source

V4L/DVB (8005): Fix OOPS if frontend is null

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>
Mauro Carvalho Chehab 17 năm trước cách đây
mục cha
commit
bf67cac131
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      drivers/media/video/saa7134/saa7134-dvb.c

+ 2 - 1
drivers/media/video/saa7134/saa7134-dvb.c

@@ -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;