brcmfmac: free primary net_device when brcmf_bus_start() fails
authorArend van Spriel <arend@broadcom.com>
Fri, 7 Jun 2013 09:03:00 +0000 (11:03 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 12 Jun 2013 19:06:48 +0000 (15:06 -0400)
commitee06fcad742ab52a1ba67ba734fee6a98af51621
tree7bf2e5edbf05ee40f50a54ddc704946a084ea4ac
parentc7773fc1ef55b7d1ed44a27900b86dc28351dec4
brcmfmac: free primary net_device when brcmf_bus_start() fails

When initialization within brcmf_bus_start() fails on steps
before the brcmf_net_attach() the net_device for the primary
interface needs to be freed.

This patch resolves a panic during kernel boot as reported
by Stephen Warren.

ref.: http://mid.gmane.org/51AD1F22.2080004@wwwdotorg.org

Tested-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c