Explorar o código

[media] Don't OOPS if videobuf_dvb_get_frontend return NULL

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Abylay Ospan %!s(int64=14) %!d(string=hai) anos
pai
achega
e66131cee5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      drivers/media/video/cx23885/cx23885-dvb.c

+ 1 - 1
drivers/media/video/cx23885/cx23885-dvb.c

@@ -1270,7 +1270,7 @@ int cx23885_dvb_unregister(struct cx23885_tsport *port)
 	 * implement MFE support.
 	 */
 	fe0 = videobuf_dvb_get_frontend(&port->frontends, 1);
-	if (fe0->dvb.frontend)
+	if (fe0 && fe0->dvb.frontend)
 		videobuf_dvb_unregister_bus(&port->frontends);
 
 	switch (port->dev->board) {