diff options
author | Michael Krufky <mkrufky@kernellabs.com> | 2011-09-17 13:22:59 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-09-21 09:06:57 -0400 |
commit | 310df3662e07e38b054334462bbee71356a9b0a5 (patch) | |
tree | f988b98f1cf2a59e557b9cd26d9f415fd9416032 /drivers/media/dvb/dvb-usb/cxusb.c | |
parent | 2b7a7c30e3e9802f13960d096cd6198bb6f4a8c9 (diff) |
[media] cxusb: fix ERROR: do not use assignment in if condition
Signed-off-by: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/cxusb.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/cxusb.c | 52 |
1 files changed, 32 insertions, 20 deletions
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c index 7f610da8cca8..9f2a02c48377 100644 --- a/drivers/media/dvb/dvb-usb/cxusb.c +++ b/drivers/media/dvb/dvb-usb/cxusb.c | |||
@@ -837,8 +837,9 @@ static int cxusb_cx22702_frontend_attach(struct dvb_usb_adapter *adap) | |||
837 | 837 | ||
838 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, &b, 1); | 838 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, &b, 1); |
839 | 839 | ||
840 | if ((adap->fe_adap[0].fe = dvb_attach(cx22702_attach, &cxusb_cx22702_config, | 840 | adap->fe_adap[0].fe = dvb_attach(cx22702_attach, &cxusb_cx22702_config, |
841 | &adap->dev->i2c_adap)) != NULL) | 841 | &adap->dev->i2c_adap); |
842 | if ((adap->fe_adap[0].fe) != NULL) | ||
842 | return 0; | 843 | return 0; |
843 | 844 | ||
844 | return -EIO; | 845 | return -EIO; |
@@ -851,8 +852,10 @@ static int cxusb_lgdt3303_frontend_attach(struct dvb_usb_adapter *adap) | |||
851 | 852 | ||
852 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); | 853 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); |
853 | 854 | ||
854 | if ((adap->fe_adap[0].fe = dvb_attach(lgdt330x_attach, &cxusb_lgdt3303_config, | 855 | adap->fe_adap[0].fe = dvb_attach(lgdt330x_attach, |
855 | &adap->dev->i2c_adap)) != NULL) | 856 | &cxusb_lgdt3303_config, |
857 | &adap->dev->i2c_adap); | ||
858 | if ((adap->fe_adap[0].fe) != NULL) | ||
856 | return 0; | 859 | return 0; |
857 | 860 | ||
858 | return -EIO; | 861 | return -EIO; |
@@ -876,8 +879,9 @@ static int cxusb_mt352_frontend_attach(struct dvb_usb_adapter *adap) | |||
876 | 879 | ||
877 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); | 880 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); |
878 | 881 | ||
879 | if ((adap->fe_adap[0].fe = dvb_attach(mt352_attach, &cxusb_mt352_config, | 882 | adap->fe_adap[0].fe = dvb_attach(mt352_attach, &cxusb_mt352_config, |
880 | &adap->dev->i2c_adap)) != NULL) | 883 | &adap->dev->i2c_adap); |
884 | if ((adap->fe_adap[0].fe) != NULL) | ||
881 | return 0; | 885 | return 0; |
882 | 886 | ||
883 | return -EIO; | 887 | return -EIO; |
@@ -890,11 +894,15 @@ static int cxusb_dee1601_frontend_attach(struct dvb_usb_adapter *adap) | |||
890 | 894 | ||
891 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); | 895 | cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); |
892 | 896 | ||
893 | if (((adap->fe_adap[0].fe = dvb_attach(mt352_attach, &cxusb_dee1601_config, | 897 | adap->fe_adap[0].fe = dvb_attach(mt352_attach, &cxusb_dee1601_config, |
894 | &adap->dev->i2c_adap)) != NULL) || | 898 | &adap->dev->i2c_adap); |
895 | ((adap->fe_adap[0].fe = dvb_attach(zl10353_attach, | 899 | if ((adap->fe_adap[0].fe) != NULL) |
896 | &cxusb_zl10353_dee1601_config, | 900 | return 0; |
897 | &adap->dev->i2c_adap)) != NULL)) | 901 | |
902 | adap->fe_adap[0].fe = dvb_attach(zl10353_attach, | ||
903 | &cxusb_zl10353_dee1601_config, | ||
904 | &adap->dev->i2c_adap); | ||
905 | if ((adap->fe_adap[0].fe) != NULL) | ||
898 | return 0; | 906 | return 0; |
899 | 907 | ||
900 | return -EIO; | 908 | return -EIO; |
@@ -917,9 +925,11 @@ static int cxusb_dualdig4_frontend_attach(struct dvb_usb_adapter *adap) | |||
917 | cxusb_bluebird_gpio_pulse(adap->dev, 0x01, 1); | 925 | cxusb_bluebird_gpio_pulse(adap->dev, 0x01, 1); |
918 | cxusb_bluebird_gpio_pulse(adap->dev, 0x02, 1); | 926 | cxusb_bluebird_gpio_pulse(adap->dev, 0x02, 1); |
919 | 927 | ||
920 | if ((adap->fe_adap[0].fe = dvb_attach(zl10353_attach, | 928 | adap->fe_adap[0].fe = |
921 | &cxusb_zl10353_xc3028_config_no_i2c_gate, | 929 | dvb_attach(zl10353_attach, |
922 | &adap->dev->i2c_adap)) == NULL) | 930 | &cxusb_zl10353_xc3028_config_no_i2c_gate, |
931 | &adap->dev->i2c_adap); | ||
932 | if ((adap->fe_adap[0].fe) == NULL) | ||
923 | return -EIO; | 933 | return -EIO; |
924 | 934 | ||
925 | /* try to determine if there is no IR decoder on the I2C bus */ | 935 | /* 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) | |||
1108 | cxusb_bluebird_gpio_pulse(adap->dev, 0x01, 1); | 1118 | cxusb_bluebird_gpio_pulse(adap->dev, 0x01, 1); |
1109 | cxusb_bluebird_gpio_pulse(adap->dev, 0x02, 1); | 1119 | cxusb_bluebird_gpio_pulse(adap->dev, 0x02, 1); |
1110 | 1120 | ||
1111 | if ((adap->fe_adap[0].fe = dvb_attach(zl10353_attach, | 1121 | adap->fe_adap[0].fe = dvb_attach(zl10353_attach, |
1112 | &cxusb_zl10353_xc3028_config, | 1122 | &cxusb_zl10353_xc3028_config, |
1113 | &adap->dev->i2c_adap)) != NULL) | 1123 | &adap->dev->i2c_adap); |
1124 | if ((adap->fe_adap[0].fe) != NULL) | ||
1114 | return 0; | 1125 | return 0; |
1115 | 1126 | ||
1116 | if ((adap->fe_adap[0].fe = dvb_attach(mt352_attach, | 1127 | adap->fe_adap[0].fe = dvb_attach(mt352_attach, |
1117 | &cxusb_mt352_xc3028_config, | 1128 | &cxusb_mt352_xc3028_config, |
1118 | &adap->dev->i2c_adap)) != NULL) | 1129 | &adap->dev->i2c_adap); |
1130 | if ((adap->fe_adap[0].fe) != NULL) | ||
1119 | return 0; | 1131 | return 0; |
1120 | 1132 | ||
1121 | return -EIO; | 1133 | return -EIO; |