aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb
diff options
context:
space:
mode:
authorMárton Németh <nm127@freemail.hu>2010-03-01 02:10:52 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-17 23:46:26 -0400
commit6120792baa00542b5113222b0e09f5e52b510444 (patch)
tree744fdeab6f6e37bdf21837f2bc9b2e6bb5526803 /drivers/media/dvb/dvb-usb
parent278a58cf2ab6e690fa79ca7e0d466a0cb453296f (diff)
V4L/DVB: az6027: remove redundant condition check
The condition (msg[i].addr == 0xd0) is checked twice the second one is not necessary. This will remove the following compiler warning: az6027.c: In function 'az6027_i2c_xfer': az6027.c:942: warning: 'index' may be used uninitialized in this function az6027.c:943: warning: 'value' may be used uninitialized in this function az6027.c:944: warning: 'length' may be used uninitialized in this function az6027.c:945: warning: 'req' may be used uninitialized in this function Signed-off-by: Márton Németh <nm127@freemail.hu> Cc: Manu Abraham <abraham.manu@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
-rw-r--r--drivers/media/dvb/dvb-usb/az6027.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/media/dvb/dvb-usb/az6027.c b/drivers/media/dvb/dvb-usb/az6027.c
index d7290b2c0913..27acbfb6d33a 100644
--- a/drivers/media/dvb/dvb-usb/az6027.c
+++ b/drivers/media/dvb/dvb-usb/az6027.c
@@ -976,17 +976,14 @@ static int az6027_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int n
976 i++; 976 i++;
977 } else { 977 } else {
978 978
979 if (msg[i].addr == 0xd0) { 979 /* demod 16bit addr */
980 /* demod 16bit addr */ 980 req = 0xBD;
981 req = 0xBD; 981 index = (((msg[i].buf[0] << 8) & 0xff00) | (msg[i].buf[1] & 0x00ff));
982 index = (((msg[i].buf[0] << 8) & 0xff00) | (msg[i].buf[1] & 0x00ff)); 982 value = msg[i].addr + (2 << 8);
983 value = msg[i].addr + (2 << 8); 983 length = msg[i].len - 2;
984 length = msg[i].len - 2; 984 len = msg[i].len - 2;
985 len = msg[i].len - 2; 985 for (j = 0; j < len; j++)
986 for (j = 0; j < len; j++) 986 data[j] = msg[i].buf[j + 2];
987 data[j] = msg[i].buf[j + 2];
988
989 }
990 az6027_usb_out_op(d, req, value, index, data, length); 987 az6027_usb_out_op(d, req, value, index, data, length);
991 } 988 }
992 } 989 }