aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Cooper <jason@lakedaemon.net>2010-09-30 15:15:41 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-05 12:22:25 -0400
commit02266551e8d02456c526422e94e9cbac9c3295df (patch)
treec47f482fc2069644d7a2c7b211e9778c2e1ada0d
parent59334c2f1fcc2c5ddb5828d93eba3bd486576cae (diff)
staging: brcm80211: fix checkpatch error 'assignment in if condition'
Signed-off-by: Jason Cooper <jason@lakedaemon.net> Acked-by: Henry Ptasinski <henryp@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/brcm80211/brcmfmac/dhd_cdc.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c b/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c
index d5bd0ff3451..46c03af1b1c 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c
@@ -131,7 +131,8 @@ dhdcdc_query_ioctl(dhd_pub_t *dhd, int ifidx, uint cmd, void *buf, uint len)
131 if (buf) 131 if (buf)
132 memcpy(prot->buf, buf, len); 132 memcpy(prot->buf, buf, len);
133 133
134 if ((ret = dhdcdc_msg(dhd)) < 0) { 134 ret = dhdcdc_msg(dhd);
135 if (ret < 0) {
135 DHD_ERROR(("dhdcdc_query_ioctl: dhdcdc_msg failed w/status " 136 DHD_ERROR(("dhdcdc_query_ioctl: dhdcdc_msg failed w/status "
136 "%d\n", ret)); 137 "%d\n", ret));
137 goto done; 138 goto done;
@@ -139,7 +140,8 @@ dhdcdc_query_ioctl(dhd_pub_t *dhd, int ifidx, uint cmd, void *buf, uint len)
139 140
140retry: 141retry:
141 /* wait for interrupt and get first fragment */ 142 /* wait for interrupt and get first fragment */
142 if ((ret = dhdcdc_cmplt(dhd, prot->reqid, len)) < 0) 143 ret = dhdcdc_cmplt(dhd, prot->reqid, len);
144 if (ret < 0)
143 goto done; 145 goto done;
144 146
145 flags = ltoh32(msg->flags); 147 flags = ltoh32(msg->flags);
@@ -196,10 +198,12 @@ int dhdcdc_set_ioctl(dhd_pub_t *dhd, int ifidx, uint cmd, void *buf, uint len)
196 if (buf) 198 if (buf)
197 memcpy(prot->buf, buf, len); 199 memcpy(prot->buf, buf, len);
198 200
199 if ((ret = dhdcdc_msg(dhd)) < 0) 201 ret = dhdcdc_msg(dhd);
202 if (ret < 0)
200 goto done; 203 goto done;
201 204
202 if ((ret = dhdcdc_cmplt(dhd, prot->reqid, len)) < 0) 205 ret = dhdcdc_cmplt(dhd, prot->reqid, len);
206 if (ret < 0)
203 goto done; 207 goto done;
204 208
205 flags = ltoh32(msg->flags); 209 flags = ltoh32(msg->flags);
@@ -369,7 +373,8 @@ int dhd_prot_hdrpull(dhd_pub_t *dhd, int *ifidx, void *pktbuf)
369 373
370 h = (struct bdc_header *)PKTDATA(pktbuf); 374 h = (struct bdc_header *)PKTDATA(pktbuf);
371 375
372 if ((*ifidx = BDC_GET_IF_IDX(h)) >= DHD_MAX_IFS) { 376 *ifidx = BDC_GET_IF_IDX(h);
377 if (*ifidx >= DHD_MAX_IFS) {
373 DHD_ERROR(("%s: rx data ifnum out of range (%d)\n", 378 DHD_ERROR(("%s: rx data ifnum out of range (%d)\n",
374 __func__, *ifidx)); 379 __func__, *ifidx));
375 return BCME_ERROR; 380 return BCME_ERROR;
@@ -402,15 +407,15 @@ int dhd_prot_attach(dhd_pub_t *dhd)
402 dhd_prot_t *cdc; 407 dhd_prot_t *cdc;
403 408
404#ifndef DHD_USE_STATIC_BUF 409#ifndef DHD_USE_STATIC_BUF
405 if (!(cdc = (dhd_prot_t *) MALLOC(dhd->osh, sizeof(dhd_prot_t)))) { 410 cdc = (dhd_prot_t *) MALLOC(dhd->osh, sizeof(dhd_prot_t));
411 if (!cdc) {
406 DHD_ERROR(("%s: kmalloc failed\n", __func__)); 412 DHD_ERROR(("%s: kmalloc failed\n", __func__));
407 goto fail; 413 goto fail;
408 } 414 }
409#else 415#else
410 if (! 416 cdc = (dhd_prot_t *) dhd_os_prealloc(DHD_PREALLOC_PROT,
411 (cdc = 417 sizeof(dhd_prot_t));
412 (dhd_prot_t *) dhd_os_prealloc(DHD_PREALLOC_PROT, 418 if (!cdc) {
413 sizeof(dhd_prot_t)))) {
414 DHD_ERROR(("%s: kmalloc failed\n", __func__)); 419 DHD_ERROR(("%s: kmalloc failed\n", __func__));
415 goto fail; 420 goto fail;
416 } 421 }