staging: brcm80211: remove unnecessary null check
authorHenry Ptasinski <henryp@broadcom.com>
Wed, 29 Jun 2011 23:46:55 +0000 (16:46 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 5 Jul 2011 16:57:14 +0000 (09:57 -0700)
kfree(NULL) is safe, and the rest of the cleanup should be done regardless
to make sure the state is consistent.

Signed-off-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c

index 48550f350376dcde534ee02737885b28e0500ce5..0fae0b1544ee56f289c09d489b9a0933b7e116d8 100644 (file)
@@ -5567,11 +5567,9 @@ static void dhdsdio_release_malloc(dhd_bus_t *bus)
        if (bus->dhd && bus->dhd->dongle_reset)
                return;
 
-       if (bus->rxbuf) {
-               kfree(bus->rxbuf);
-               bus->rxctl = bus->rxbuf = NULL;
-               bus->rxlen = 0;
-       }
+       kfree(bus->rxbuf);
+       bus->rxctl = bus->rxbuf = NULL;
+       bus->rxlen = 0;
 
        kfree(bus->databuf);
        bus->databuf = NULL;