V4L/DVB (4679): Fix for NULL pointer dereference oops during boot.
authorSteven Toth <stoth@hauppauge.com>
Wed, 27 Sep 2006 04:16:50 +0000 (01:16 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 3 Oct 2006 18:14:28 +0000 (15:14 -0300)
A fix for intermittent oops's during boot which occurs
in cx88_call_i2c_clients when dvb_attach is bringing up
the frontend.

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/cx88/cx88-i2c.c

index 6e705a2afdf83c62bc69bb9972ee81bee84e70e6..88af23a938702335697fb18bb1ce33526fa79dad 100644 (file)
@@ -145,7 +145,7 @@ void cx88_call_i2c_clients(struct cx88_core *core, unsigned int cmd, void *arg)
        if (0 != core->i2c_rc)
                return;
 
-       if (core->dvbdev) {
+       if ( (core->dvbdev) && (core->dvbdev->dvb.frontend) ) {
                if (core->dvbdev->dvb.frontend->ops.i2c_gate_ctrl)
                        core->dvbdev->dvb.frontend->ops.i2c_gate_ctrl(core->dvbdev->dvb.frontend, 1);