diff options
author | Arend van Spriel <arend@broadcom.com> | 2013-05-27 21:09:56 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-05-28 13:43:09 -0400 |
commit | 9390ace916b2fd866c1762b1cd16c276d8c8c890 (patch) | |
tree | ac39894c9a5f570a2f24578d67cf167e69a44617 /drivers/net/wireless/brcm80211/brcmfmac/fweh.c | |
parent | 24e28beef939df8666a5d2784d6617cd9bb910a0 (diff) |
brcmfmac: free net device when registration fails
When registration fails the net device is no longer needed. Free
the net device and remove reference to private data from the
driver.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/fweh.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/fweh.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fweh.c b/drivers/net/wireless/brcm80211/brcmfmac/fweh.c index 5a64280e6485..83ee53a7c76e 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/fweh.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/fweh.c @@ -202,7 +202,8 @@ static void brcmf_fweh_handle_if_event(struct brcmf_pub *drvr, return; brcmf_fws_add_interface(ifp); if (!drvr->fweh.evt_handler[BRCMF_E_IF]) - err = brcmf_net_attach(ifp, false); + if (brcmf_net_attach(ifp, false) < 0) + return; } if (ifevent->action == BRCMF_E_IF_CHANGE) |