summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2011-11-30 08:49:38 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2011-11-30 20:08:59 (GMT)
commitad9547c0413686a23e48793665a9ebd3e65c474c (patch)
tree3d2bbe0cf1f0f6420b9886adc432ccd67f5b56d0
parent7468722b681ff4ea3f2cb612a28943c01c1b492a (diff)
downloadlinux-fsl-qoriq-ad9547c0413686a23e48793665a9ebd3e65c474c.tar.xz
brcm80211: fmac: small memory leak on error
We should free "bus_if" here, it's a small leak but it makes the static checkers happy. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
index 77f84f8..b416e27 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
@@ -477,8 +477,10 @@ static int brcmf_ops_sdio_probe(struct sdio_func *func,
if (!bus_if)
return -ENOMEM;
sdiodev = kzalloc(sizeof(struct brcmf_sdio_dev), GFP_KERNEL);
- if (!sdiodev)
+ if (!sdiodev) {
+ kfree(bus_if);
return -ENOMEM;
+ }
sdiodev->dev = &func->card->dev;
sdiodev->func[0] = func->card->sdio_func[0];
sdiodev->func[1] = func;