]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] cx24117: remove dead code in always 'false' if statement
authorAndi Shyti <andi@etezian.org>
Thu, 30 Jan 2014 03:05:01 +0000 (00:05 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 4 Feb 2014 08:35:26 +0000 (06:35 -0200)
At this point of the execution in the function cx24117_attach()
demod cannot be '0'. In that case the function returns earlier
with an error value ('NULL'). Remove the if statement.

This error has been reported by scan.coverity.com

Signed-off-by: Andi Shyti <andi@etezian.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/dvb-frontends/cx24117.c

index 68f768a5422d063f69b4e33446364f5af699a7a1..782dcfe6ae69a3e92cc15f3cacd56150947c284f 100644 (file)
@@ -1200,12 +1200,6 @@ struct dvb_frontend *cx24117_attach(const struct cx24117_config *config,
        state->demod = demod - 1;
        state->priv = priv;
 
-       /* test i2c bus for ack */
-       if (demod == 0) {
-               if (cx24117_readreg(state, 0x00) < 0)
-                       goto error3;
-       }
-
        dev_info(&state->priv->i2c->dev,
                "%s: Attaching frontend %d\n",
                KBUILD_MODNAME, state->demod);
@@ -1216,8 +1210,6 @@ struct dvb_frontend *cx24117_attach(const struct cx24117_config *config,
        state->frontend.demodulator_priv = state;
        return &state->frontend;
 
-error3:
-       kfree(state);
 error2:
        cx24117_release_priv(priv);
 error1: