summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHante Meuleman <meuleman@broadcom.com>2012-09-13 19:12:04 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2012-09-24 18:59:09 (GMT)
commit9cd23a7191f1abc32252ba92494a910d5cc5fd02 (patch)
tree9685c6ee43d3d1016d4491fc492dc04c17daeff7
parent4531603a7acb1463ec0b466dcfedc6682e7a1718 (diff)
downloadlinux-9cd23a7191f1abc32252ba92494a910d5cc5fd02.tar.xz
brcmfmac: fix bug causing errorneous free on exception.
This patch fixes bug where driver frees resources twice when an exception occurs. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/usb.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
index c6d5aeb..03f59cd 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
@@ -1340,10 +1340,8 @@ static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo,
struct device *dev = devinfo->dev;
bus_pub = brcmf_usb_attach(devinfo, BRCMF_USB_NRXQ, BRCMF_USB_NTXQ);
- if (!bus_pub) {
- ret = -ENODEV;
- goto fail;
- }
+ if (!bus_pub)
+ return -ENODEV;
bus = kzalloc(sizeof(struct brcmf_bus), GFP_ATOMIC);
if (!bus) {