]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] cx24120: don't initialize a var that won't be used
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 19 May 2015 11:04:35 +0000 (08:04 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 20 May 2015 11:54:29 +0000 (08:54 -0300)
As reported by smatch:
drivers/media/dvb-frontends/cx24120.c: In function 'cx24120_message_send':
drivers/media/dvb-frontends/cx24120.c:368:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
  int ret, ficus;
      ^

The values written by cx24120 are never checked. So, remove the
check here too. That's said, the best would be to do the reverse,
but globally: to properly handle the error codes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Patrick Boettcher <patrick.boettcher@posteo.de>
drivers/media/dvb-frontends/cx24120.c

index da50b9e1e9f80451998b6e082a2fc5ffa758922d..3ab8582e233b5ed105988e81be6dcb55220eebd6 100644 (file)
@@ -365,17 +365,17 @@ static void cx24120_check_cmd(struct cx24120_state *state, u8 id)
 static int cx24120_message_send(struct cx24120_state *state,
                                struct cx24120_cmd *cmd)
 {
-       int ret, ficus;
+       int ficus;
 
        if (state->mpeg_enabled) {
                /* Disable mpeg out on certain commands */
                cx24120_check_cmd(state, cmd->id);
        }
 
-       ret = cx24120_writereg(state, CX24120_REG_CMD_START, cmd->id);
-       ret = cx24120_writeregs(state, CX24120_REG_CMD_ARGS, &cmd->arg[0],
-                               cmd->len, 1);
-       ret = cx24120_writereg(state, CX24120_REG_CMD_END, 0x01);
+       cx24120_writereg(state, CX24120_REG_CMD_START, cmd->id);
+       cx24120_writeregs(state, CX24120_REG_CMD_ARGS, &cmd->arg[0],
+                         cmd->len, 1);
+       cx24120_writereg(state, CX24120_REG_CMD_END, 0x01);
 
        ficus = 1000;
        while (cx24120_readreg(state, CX24120_REG_CMD_END)) {