[media] af9015: small optimization
authorAntti Palosaari <crope@iki.fi>
Thu, 16 Jun 2011 23:02:41 +0000 (20:02 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 27 Jul 2011 20:55:57 +0000 (17:55 -0300)
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/af9015.c

index 3de4641caa2f1178c45e3343acefe617ddf1f061..0bfe83b63e0168ae0ccc66688546c9e1464e5799 100644 (file)
@@ -306,12 +306,12 @@ Due to that the only way to select correct tuner is use demodulator I2C-gate.
                        ret = af9015_ctrl_msg(d, &req);
                        i += 2;
                } else if (msg[i].flags & I2C_M_RD) {
-                       ret = -EINVAL;
                        if (msg[i].addr ==
-                               af9015_af9013_config[0].demod_address)
+                               af9015_af9013_config[0].demod_address) {
+                               ret = -EINVAL;
                                goto error;
-                       else
-                               req.cmd = READ_I2C;
+                       }
+                       req.cmd = READ_I2C;
                        req.i2c_addr = msg[i].addr;
                        req.addr = addr;
                        req.mbox = mbox;