diff options
author | Jes Sorensen <Jes.Sorensen@redhat.com> | 2015-08-06 12:46:31 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-08-13 15:36:47 +0300 |
commit | 94fdc2e627d1b479a117cd8b9ece5f4613a5c956 (patch) | |
tree | 125033af6b6efbc00aa7c8c8b59a7479586d2416 /drivers/net/wireless/orinoco/orinoco_cs.c | |
parent | cb9d61e5304e2880180e4ccf685a298c868094e0 (diff) | |
download | linux-stable-94fdc2e627d1b479a117cd8b9ece5f4613a5c956.tar.gz linux-stable-94fdc2e627d1b479a117cd8b9ece5f4613a5c956.tar.bz2 linux-stable-94fdc2e627d1b479a117cd8b9ece5f4613a5c956.zip |
orinoco: Do not call wiphy_unregister() from free_orinocodev()
alloc_orinocodev() would allocate the wiphy entry, but it would only get
registered much later in orinoco_init(). If something failed in the init
process inbetween the call to alloc_orinocodev() and the completion
of orinoco_init(), the drivers would end up calling wiphy_unregister()
with a NULL pointer causing beautiful OOPS fireworks.
Explicitly call wiphy_unregister() instead in the right places.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/orinoco/orinoco_cs.c')
-rw-r--r-- | drivers/net/wireless/orinoco/orinoco_cs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c index c0a27377d9e2..a956f965a1e5 100644 --- a/drivers/net/wireless/orinoco/orinoco_cs.c +++ b/drivers/net/wireless/orinoco/orinoco_cs.c @@ -118,6 +118,7 @@ static void orinoco_cs_detach(struct pcmcia_device *link) orinoco_cs_release(link); + wiphy_unregister(priv_to_wiphy(priv)); free_orinocodev(priv); } /* orinoco_cs_detach */ |