[media] Don't OOPS if videobuf_dvb_get_frontend return NULL
authorAbylay Ospan <aospan@netup.ru>
Fri, 15 Jul 2011 18:01:07 +0000 (15:01 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 27 Jul 2011 20:56:07 +0000 (17:56 -0300)
Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx23885/cx23885-dvb.c

index ad2fd13817f6ba6c8294a907bafb3f2122be7e4d..aa83f07b1b0f7bac44c7b72f1893c9346fabecb0 100644 (file)
@@ -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) {