brcm80211: Delete unnecessary checks before two function calls
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 4 Feb 2015 19:28:49 +0000 (20:28 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 6 Feb 2015 06:52:50 +0000 (08:52 +0200)
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>
drivers/net/wireless/brcm80211/brcmfmac/sdio.c
drivers/net/wireless/brcm80211/brcmfmac/usb.c

index 5e9d20853bbb8d569d03f231276c99f2d95833c2..faec35c899ec1fb50b67041dd1539d39319902eb 100644 (file)
@@ -2538,8 +2538,7 @@ static void brcmf_sdio_bus_stop(struct device *dev)
        brcmu_pktq_flush(&bus->txq, true, NULL, NULL);
 
        /* Clear any held glomming stuff */
-       if (bus->glomd)
-               brcmu_pkt_buf_free_skb(bus->glomd);
+       brcmu_pkt_buf_free_skb(bus->glomd);
        brcmf_sdio_free_glom(bus);
 
        /* Clear rx control and wake any waiters */
index 1b9572988c773c350baf6b9e81142253322903a9..5df6aa72cc2db32c5ccca6f76c50d79dc05914ed 100644 (file)
@@ -421,7 +421,7 @@ fail:
        brcmf_err("fail!\n");
        while (!list_empty(q)) {
                req = list_entry(q->next, struct brcmf_usbreq, list);
-               if (req && req->urb)
+               if (req)
                        usb_free_urb(req->urb);
                list_del(q->next);
        }