Thread (142 messages) 142 messages, 9 authors, 2011-07-06
STALE5467d REVIEWED: 3 (0M)

[PATCH 031/119] staging: brcm80211: remove unnecessary null check

From: Franky Lin <hidden>
Date: 2011-06-29 23:48:42
Subsystem: staging subsystem, the rest · Maintainers: Greg Kroah-Hartman, Linus Torvalds

From: Henry Ptasinski <redacted>

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 <redacted>
Reviewed-by: Roland Vossen <redacted>
Reviewed-by: Arend van Spriel <redacted>
Reviewed-by: Franky Lin <redacted>
---
 drivers/staging/brcm80211/brcmfmac/dhd_sdio.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
index 48550f3..0fae0b1 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;
-- 
1.7.1

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help