[media] dibusb-common: fix ERROR: do not use assignment in if condition
authorMichael Krufky <mkrufky@kernellabs.com>
Sat, 17 Sep 2011 17:34:56 +0000 (14:34 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 21 Sep 2011 13:07:10 +0000 (10:07 -0300)
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/dibusb-common.c

index 109a4601247ae498115ed75c5d8f77f36f4ac681..a76bbb29ca36eeb0c5a3cfc0b42fe9a7ae422df8 100644 (file)
@@ -255,8 +255,16 @@ int dibusb_dib3000mc_frontend_attach(struct dvb_usb_adapter *adap)
                msleep(1000);
        }
 
-       if ((adap->fe_adap[0].fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, DEFAULT_DIB3000P_I2C_ADDRESS,  &mod3000p_dib3000p_config)) != NULL ||
-               (adap->fe_adap[0].fe = dvb_attach(dib3000mc_attach, &adap->dev->i2c_adap, DEFAULT_DIB3000MC_I2C_ADDRESS, &mod3000p_dib3000p_config)) != NULL) {
+       adap->fe_adap[0].fe = dvb_attach(dib3000mc_attach,
+                                        &adap->dev->i2c_adap,
+                                        DEFAULT_DIB3000P_I2C_ADDRESS,
+                                        &mod3000p_dib3000p_config);
+       if ((adap->fe_adap[0].fe) == NULL)
+               adap->fe_adap[0].fe = dvb_attach(dib3000mc_attach,
+                                                &adap->dev->i2c_adap,
+                                                DEFAULT_DIB3000MC_I2C_ADDRESS,
+                                                &mod3000p_dib3000p_config);
+       if ((adap->fe_adap[0].fe) != NULL) {
                if (adap->priv != NULL) {
                        struct dibusb_state *st = adap->priv;
                        st->ops.pid_parse = dib3000mc_pid_parse;