[media] DVB: dvb_frontend: check function pointers on reinitialize
authorAndreas Oberritter <obi@linuxtv.org>
Wed, 24 Aug 2011 17:33:52 +0000 (14:33 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 4 Sep 2011 13:56:08 +0000 (10:56 -0300)
Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-core/dvb_frontend.c

index a716627..4b05931 100644 (file)
@@ -577,12 +577,10 @@ restart:
 
                if (fepriv->reinitialise) {
                        dvb_frontend_init(fe);
-                       if (fepriv->tone != -1) {
+                       if (fe->ops.set_tone && fepriv->tone != -1)
                                fe->ops.set_tone(fe, fepriv->tone);
-                       }
-                       if (fepriv->voltage != -1) {
+                       if (fe->ops.set_voltage && fepriv->voltage != -1)
                                fe->ops.set_voltage(fe, fepriv->voltage);
-                       }
                        fepriv->reinitialise = 0;
                }