]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
[media] stv0900: remove unnecessary null pointer check
authorCong Ding <dinggnu@gmail.com>
Mon, 4 Feb 2013 01:34:48 +0000 (22:34 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 8 Feb 2013 20:05:48 +0000 (18:05 -0200)
The address of a variable is impossible to be null, so we remove the check.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb-frontends/stv0900_core.c
drivers/media/dvb-frontends/stv0900_sw.c

index 0fb34e1909d11f36db3a6dc14c839d5b495f1d0f..e5a87b57d8550c39d7519282d1e6469a3c939b84 100644 (file)
@@ -524,11 +524,8 @@ void stv0900_set_tuner(struct dvb_frontend *fe, u32 frequency,
        struct dvb_frontend_ops *frontend_ops = NULL;
        struct dvb_tuner_ops *tuner_ops = NULL;
 
-       if (&fe->ops)
-               frontend_ops = &fe->ops;
-
-       if (&frontend_ops->tuner_ops)
-               tuner_ops = &frontend_ops->tuner_ops;
+       frontend_ops = &fe->ops;
+       tuner_ops = &frontend_ops->tuner_ops;
 
        if (tuner_ops->set_frequency) {
                if ((tuner_ops->set_frequency(fe, frequency)) < 0)
@@ -552,11 +549,8 @@ void stv0900_set_bandwidth(struct dvb_frontend *fe, u32 bandwidth)
        struct dvb_frontend_ops *frontend_ops = NULL;
        struct dvb_tuner_ops *tuner_ops = NULL;
 
-       if (&fe->ops)
-               frontend_ops = &fe->ops;
-
-       if (&frontend_ops->tuner_ops)
-               tuner_ops = &frontend_ops->tuner_ops;
+       frontend_ops = &fe->ops;
+       tuner_ops = &frontend_ops->tuner_ops;
 
        if (tuner_ops->set_bandwidth) {
                if ((tuner_ops->set_bandwidth(fe, bandwidth)) < 0)
index 4af20780fb9c5c56c90ac66cf61294b60068df53..0a40edfad73945423049ce48892c62bd7c1a9836 100644 (file)
@@ -1167,11 +1167,8 @@ static u32 stv0900_get_tuner_freq(struct dvb_frontend *fe)
        struct dvb_tuner_ops *tuner_ops = NULL;
        u32 freq = 0;
 
-       if (&fe->ops)
-               frontend_ops = &fe->ops;
-
-       if (&frontend_ops->tuner_ops)
-               tuner_ops = &frontend_ops->tuner_ops;
+       frontend_ops = &fe->ops;
+       tuner_ops = &frontend_ops->tuner_ops;
 
        if (tuner_ops->get_frequency) {
                if ((tuner_ops->get_frequency(fe, &freq)) < 0)