Skip to content

Commit

Permalink
brcmfmac: fix bug causing errorneous free on exception.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hante Meuleman authored and John W. Linville committed Sep 24, 2012
1 parent 4531603 commit 9cd23a7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/wireless/brcm80211/brcmfmac/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9cd23a7

Please sign in to comment.