From: Henry Ptasinski Date: Wed, 29 Jun 2011 23:46:55 +0000 (-0700) Subject: staging: brcm80211: remove unnecessary null check X-Git-Tag: next-20110726~5^2~320 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=521223a27a760658e04e65d8deaf5339070f15f6;p=karo-tx-linux.git staging: brcm80211: remove unnecessary null check 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 Reviewed-by: Roland Vossen Reviewed-by: Arend van Spriel Reviewed-by: Franky Lin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c index 48550f350376..0fae0b1544ee 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c @@ -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;