]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] cxusb: fix ERROR: do not use assignment in if condition
authorMichael Krufky <mkrufky@kernellabs.com>
Sat, 17 Sep 2011 17:22:59 +0000 (14:22 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 21 Sep 2011 13:06:57 +0000 (10:06 -0300)
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/cxusb.c

index 7f610da8cca8055cfadd10f9519d56ec890403bc..9f2a02c483779db28f3a754a0215f72484ac8fca 100644 (file)
@@ -837,8 +837,9 @@ static int cxusb_cx22702_frontend_attach(struct dvb_usb_adapter *adap)
 
        cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, &b, 1);
 
-       if ((adap->fe_adap[0].fe = dvb_attach(cx22702_attach, &cxusb_cx22702_config,
-                                  &adap->dev->i2c_adap)) != NULL)
+       adap->fe_adap[0].fe = dvb_attach(cx22702_attach, &cxusb_cx22702_config,
+                                        &adap->dev->i2c_adap);
+       if ((adap->fe_adap[0].fe) != NULL)
                return 0;
 
        return -EIO;
@@ -851,8 +852,10 @@ static int cxusb_lgdt3303_frontend_attach(struct dvb_usb_adapter *adap)
 
        cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0);
 
-       if ((adap->fe_adap[0].fe = dvb_attach(lgdt330x_attach, &cxusb_lgdt3303_config,
-                                  &adap->dev->i2c_adap)) != NULL)
+       adap->fe_adap[0].fe = dvb_attach(lgdt330x_attach,
+                                        &cxusb_lgdt3303_config,
+                                        &adap->dev->i2c_adap);
+       if ((adap->fe_adap[0].fe) != NULL)
                return 0;
 
        return -EIO;
@@ -876,8 +879,9 @@ static int cxusb_mt352_frontend_attach(struct dvb_usb_adapter *adap)
 
        cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0);
 
-       if ((adap->fe_adap[0].fe = dvb_attach(mt352_attach, &cxusb_mt352_config,
-                                  &adap->dev->i2c_adap)) != NULL)
+       adap->fe_adap[0].fe = dvb_attach(mt352_attach, &cxusb_mt352_config,
+                                        &adap->dev->i2c_adap);
+       if ((adap->fe_adap[0].fe) != NULL)
                return 0;
 
        return -EIO;
@@ -890,11 +894,15 @@ static int cxusb_dee1601_frontend_attach(struct dvb_usb_adapter *adap)
 
        cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0);
 
-       if (((adap->fe_adap[0].fe = dvb_attach(mt352_attach, &cxusb_dee1601_config,
-                                   &adap->dev->i2c_adap)) != NULL) ||
-               ((adap->fe_adap[0].fe = dvb_attach(zl10353_attach,
-                                       &cxusb_zl10353_dee1601_config,
-                                       &adap->dev->i2c_adap)) != NULL))
+       adap->fe_adap[0].fe = dvb_attach(mt352_attach, &cxusb_dee1601_config,
+                                        &adap->dev->i2c_adap);
+       if ((adap->fe_adap[0].fe) != NULL)
+               return 0;
+
+       adap->fe_adap[0].fe = dvb_attach(zl10353_attach,
+                                        &cxusb_zl10353_dee1601_config,
+                                        &adap->dev->i2c_adap);
+       if ((adap->fe_adap[0].fe) != NULL)
                return 0;
 
        return -EIO;
@@ -917,9 +925,11 @@ static int cxusb_dualdig4_frontend_attach(struct dvb_usb_adapter *adap)
        cxusb_bluebird_gpio_pulse(adap->dev, 0x01, 1);
        cxusb_bluebird_gpio_pulse(adap->dev, 0x02, 1);
 
-       if ((adap->fe_adap[0].fe = dvb_attach(zl10353_attach,
-                                  &cxusb_zl10353_xc3028_config_no_i2c_gate,
-                                  &adap->dev->i2c_adap)) == NULL)
+       adap->fe_adap[0].fe =
+               dvb_attach(zl10353_attach,
+                          &cxusb_zl10353_xc3028_config_no_i2c_gate,
+                          &adap->dev->i2c_adap);
+       if ((adap->fe_adap[0].fe) == NULL)
                return -EIO;
 
        /* try to determine if there is no IR decoder on the I2C bus */
@@ -1108,14 +1118,16 @@ static int cxusb_nano2_frontend_attach(struct dvb_usb_adapter *adap)
        cxusb_bluebird_gpio_pulse(adap->dev, 0x01, 1);
        cxusb_bluebird_gpio_pulse(adap->dev, 0x02, 1);
 
-       if ((adap->fe_adap[0].fe = dvb_attach(zl10353_attach,
-                                  &cxusb_zl10353_xc3028_config,
-                                  &adap->dev->i2c_adap)) != NULL)
+       adap->fe_adap[0].fe = dvb_attach(zl10353_attach,
+                                        &cxusb_zl10353_xc3028_config,
+                                        &adap->dev->i2c_adap);
+       if ((adap->fe_adap[0].fe) != NULL)
                return 0;
 
-       if ((adap->fe_adap[0].fe = dvb_attach(mt352_attach,
-                                  &cxusb_mt352_xc3028_config,
-                                  &adap->dev->i2c_adap)) != NULL)
+       adap->fe_adap[0].fe = dvb_attach(mt352_attach,
+                                        &cxusb_mt352_xc3028_config,
+                                        &adap->dev->i2c_adap);
+       if ((adap->fe_adap[0].fe) != NULL)
                return 0;
 
        return -EIO;