summaryrefslogtreecommitdiffstats
path: root/drivers/staging/brcm80211/util/bcmotp.c
diff options
context:
space:
mode:
authorJason Cooper <jason@lakedaemon.net>2010-09-14 09:45:33 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-09-14 09:04:07 -0700
commitca8c1e5990926406708d99fe1ce2a6f5e12f9033 (patch)
treea91f355345095656e72711caa6b0e6144732f30b /drivers/staging/brcm80211/util/bcmotp.c
parent90ea22962c5160812c601a115fb7b80c60d49fad (diff)
downloadop-kernel-dev-ca8c1e5990926406708d99fe1ce2a6f5e12f9033.zip
op-kernel-dev-ca8c1e5990926406708d99fe1ce2a6f5e12f9033.tar.gz
staging: brcm80211: fix "ERROR: do not use assignment in if condition"
Signed-off-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/brcm80211/util/bcmotp.c')
-rw-r--r--drivers/staging/brcm80211/util/bcmotp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/staging/brcm80211/util/bcmotp.c b/drivers/staging/brcm80211/util/bcmotp.c
index 9011ed9..ea4dc1e 100644
--- a/drivers/staging/brcm80211/util/bcmotp.c
+++ b/drivers/staging/brcm80211/util/bcmotp.c
@@ -640,7 +640,8 @@ static void *BCMNMIATTACHFN(hndotp_init) (si_t *sih)
osh = si_osh(oi->sih);
/* Check for otp */
- if ((cc = si_setcoreidx(sih, SI_CC_IDX)) != NULL) {
+ cc = si_setcoreidx(sih, SI_CC_IDX);
+ if (cc != NULL) {
cap = R_REG(osh, &cc->capabilities);
if ((cap & CC_CAP_OTPSIZE) == 0) {
/* Nothing there */
@@ -754,7 +755,8 @@ static int hndotp_nvread(void *oh, char *data, uint *len)
/* Read the whole otp so we can easily manipulate it */
lim = hndotp_size(oh);
- if ((rawotp = MALLOC(si_osh(oi->sih), lim)) == NULL) {
+ rawotp = MALLOC(si_osh(oi->sih), lim);
+ if (rawotp == NULL) {
rc = -2;
goto out;
}
@@ -927,7 +929,8 @@ BCMNMIATTACHFN(otp_read_region) (si_t *sih, int region, uint16 *data,
void *oh;
int err = 0;
- if (!(wasup = si_is_otp_powered(sih)))
+ wasup = si_is_otp_powered(sih);
+ if (!wasup)
si_otp_power(sih, TRUE);
if (!si_is_otp_powered(sih) || si_is_otp_disabled(sih)) {
OpenPOWER on IntegriCloud