diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2015-02-04 14:28:49 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-02-06 01:52:50 -0500 |
commit | 297540f69fa9c7292c9866e71cb22a7bc4c5003b (patch) | |
tree | 39f7dcb30f05d95b5273f5ce23833e8564ef9761 /drivers/net/wireless/brcm80211/brcmfmac | |
parent | 6f24fe305986afcb9eb2bde1031798b3b2ebf649 (diff) |
brcm80211: Delete unnecessary checks before two function calls
The functions brcmu_pkt_buf_free_skb() and usb_free_urb() test whether
their argument is NULL and then return immediately. Thus the test around
the call is not needed.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/sdio.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/usb.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c index 5e9d20853bbb..faec35c899ec 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c | |||
@@ -2538,8 +2538,7 @@ static void brcmf_sdio_bus_stop(struct device *dev) | |||
2538 | brcmu_pktq_flush(&bus->txq, true, NULL, NULL); | 2538 | brcmu_pktq_flush(&bus->txq, true, NULL, NULL); |
2539 | 2539 | ||
2540 | /* Clear any held glomming stuff */ | 2540 | /* Clear any held glomming stuff */ |
2541 | if (bus->glomd) | 2541 | brcmu_pkt_buf_free_skb(bus->glomd); |
2542 | brcmu_pkt_buf_free_skb(bus->glomd); | ||
2543 | brcmf_sdio_free_glom(bus); | 2542 | brcmf_sdio_free_glom(bus); |
2544 | 2543 | ||
2545 | /* Clear rx control and wake any waiters */ | 2544 | /* Clear rx control and wake any waiters */ |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c index 1b9572988c77..5df6aa72cc2d 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c | |||
@@ -421,7 +421,7 @@ fail: | |||
421 | brcmf_err("fail!\n"); | 421 | brcmf_err("fail!\n"); |
422 | while (!list_empty(q)) { | 422 | while (!list_empty(q)) { |
423 | req = list_entry(q->next, struct brcmf_usbreq, list); | 423 | req = list_entry(q->next, struct brcmf_usbreq, list); |
424 | if (req && req->urb) | 424 | if (req) |
425 | usb_free_urb(req->urb); | 425 | usb_free_urb(req->urb); |
426 | list_del(q->next); | 426 | list_del(q->next); |
427 | } | 427 | } |