Commit 518ec3e9 authored by Roland Vossen's avatar Roland Vossen Committed by Greg Kroah-Hartman

staging: brcm80211: removed asserts from dhd_cdc.c and dhd_common.c

Reviewed-by: default avatarFranky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e16a73bc
...@@ -288,8 +288,6 @@ brcmf_proto_ioctl(struct brcmf_pub *drvr, int ifidx, struct brcmf_ioctl *ioc, ...@@ -288,8 +288,6 @@ brcmf_proto_ioctl(struct brcmf_pub *drvr, int ifidx, struct brcmf_ioctl *ioc,
BRCMF_TRACE(("%s: Enter\n", __func__)); BRCMF_TRACE(("%s: Enter\n", __func__));
ASSERT(len <= BRCMF_C_IOCTL_MAXLEN);
if (len > BRCMF_C_IOCTL_MAXLEN) if (len > BRCMF_C_IOCTL_MAXLEN)
goto done; goto done;
......
...@@ -272,7 +272,6 @@ bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q, ...@@ -272,7 +272,6 @@ bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q,
eprec = prec; eprec = prec;
else if (pktq_full(q)) { else if (pktq_full(q)) {
p = brcmu_pktq_peek_tail(q, &eprec); p = brcmu_pktq_peek_tail(q, &eprec);
ASSERT(p);
if (eprec > prec) if (eprec > prec)
return false; return false;
} }
...@@ -280,7 +279,6 @@ bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q, ...@@ -280,7 +279,6 @@ bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q,
/* Evict if needed */ /* Evict if needed */
if (eprec >= 0) { if (eprec >= 0) {
/* Detect queueing to unconfigured precedence */ /* Detect queueing to unconfigured precedence */
ASSERT(!pktq_pempty(q, eprec));
discard_oldest = AC_BITMAP_TST(drvr->wme_dp, eprec); discard_oldest = AC_BITMAP_TST(drvr->wme_dp, eprec);
if (eprec == prec && !discard_oldest) if (eprec == prec && !discard_oldest)
return false; /* refuse newer (incoming) packet */ return false; /* refuse newer (incoming) packet */
...@@ -290,9 +288,7 @@ bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q, ...@@ -290,9 +288,7 @@ bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q,
if (p == NULL) { if (p == NULL) {
BRCMF_ERROR(("%s: brcmu_pktq_penq() failed, oldest %d.", BRCMF_ERROR(("%s: brcmu_pktq_penq() failed, oldest %d.",
__func__, discard_oldest)); __func__, discard_oldest));
ASSERT(p);
} }
brcmu_pkt_buf_free_skb(p); brcmu_pkt_buf_free_skb(p);
} }
...@@ -300,10 +296,9 @@ bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q, ...@@ -300,10 +296,9 @@ bool brcmf_c_prec_enq(struct brcmf_pub *drvr, struct pktq *q,
p = brcmu_pktq_penq(q, prec, pkt); p = brcmu_pktq_penq(q, prec, pkt);
if (p == NULL) { if (p == NULL) {
BRCMF_ERROR(("%s: brcmu_pktq_penq() failed.", __func__)); BRCMF_ERROR(("%s: brcmu_pktq_penq() failed.", __func__));
ASSERT(p);
} }
return true; return p != NULL;
} }
static int static int
...@@ -317,14 +312,16 @@ brcmf_c_iovar_op(struct brcmf_pub *drvr, const char *name, ...@@ -317,14 +312,16 @@ brcmf_c_iovar_op(struct brcmf_pub *drvr, const char *name,
BRCMF_TRACE(("%s: Enter\n", __func__)); BRCMF_TRACE(("%s: Enter\n", __func__));
ASSERT(name); if (name == NULL || len <= 0)
ASSERT(len >= 0); return -EINVAL;
/* Get MUST have return space */ /* Set does not take qualifiers */
ASSERT(set || (arg && len)); if (set && (params || plen))
return -EINVAL;
/* Set does NOT take qualifiers */ /* Get must have return space;*/
ASSERT(!set || (!params && !plen)); if (!set && !(arg && len))
return -EINVAL;
vi = brcmu_iovar_lookup(brcmf_iovars, name); vi = brcmu_iovar_lookup(brcmf_iovars, name);
if (vi == NULL) { if (vi == NULL) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment