Signed-off-by: Jason Cooper <jason@xxxxxxxxxxxxxx> --- drivers/staging/brcm80211/brcmfmac/bcmutils.c | 27 ++++++++++++++++-------- 1 files changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/staging/brcm80211/brcmfmac/bcmutils.c b/drivers/staging/brcm80211/brcmfmac/bcmutils.c index 768f4d6..9ee2ac4 100644 --- a/drivers/staging/brcm80211/brcmfmac/bcmutils.c +++ b/drivers/staging/brcm80211/brcmfmac/bcmutils.c @@ -198,10 +198,12 @@ void *pktq_pdeq(struct pktq *pq, int prec) q = &pq->q[prec]; - if ((p = q->head) == NULL) + p = q->head; + if (p == NULL) return NULL; - if ((q->head = PKTLINK(p)) == NULL) + q->head = PKTLINK(p); + if (q->head == NULL) q->tail = NULL; q->len--; @@ -222,7 +224,8 @@ void *pktq_pdeq_tail(struct pktq *pq, int prec) q = &pq->q[prec]; - if ((p = q->head) == NULL) + p = q->head; + if (p == NULL) return NULL; for (prev = NULL; p != q->tail; p = PKTLINK(p)) @@ -273,7 +276,8 @@ bool pktq_pdel(struct pktq *pq, void *pktbuf, int prec) q = &pq->q[prec]; if (q->head == pktbuf) { - if ((q->head = PKTLINK(pktbuf)) == NULL) + q->head = PKTLINK(pktbuf); + if (q->head == NULL) q->tail = NULL; } else { for (p = q->head; p && PKTLINK(p) != pktbuf; p = PKTLINK(p)) @@ -324,10 +328,12 @@ void *pktq_deq(struct pktq *pq, int *prec_out) q = &pq->q[prec]; - if ((p = q->head) == NULL) + p = q->head; + if (p == NULL) return NULL; - if ((q->head = PKTLINK(p)) == NULL) + q->head = PKTLINK(p); + if (q->head == NULL) q->tail = NULL; q->len--; @@ -357,7 +363,8 @@ void *pktq_deq_tail(struct pktq *pq, int *prec_out) q = &pq->q[prec]; - if ((p = q->head) == NULL) + p = q->head; + if (p == NULL) return NULL; for (prev = NULL; p != q->tail; p = PKTLINK(p)) @@ -455,10 +462,12 @@ void *pktq_mdeq(struct pktq *pq, uint prec_bmp, int *prec_out) q = &pq->q[prec]; - if ((p = q->head) == NULL) + p = q->head; + if (p == NULL) return NULL; - if ((q->head = PKTLINK(p)) == NULL) + q->head = PKTLINK(p); + if (q->head == NULL) q->tail = NULL; q->len--; -- 1.6.3.3 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel