orinoco: Do not call wiphy_unregister() from free_orinocodev()
authorJes Sorensen <Jes.Sorensen@redhat.com>
Thu, 6 Aug 2015 16:46:31 +0000 (12:46 -0400)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 13 Aug 2015 12:36:47 +0000 (15:36 +0300)
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>
drivers/net/wireless/orinoco/main.c
drivers/net/wireless/orinoco/orinoco_cs.c
drivers/net/wireless/orinoco/orinoco_nortel.c
drivers/net/wireless/orinoco/orinoco_pci.c
drivers/net/wireless/orinoco/orinoco_plx.c
drivers/net/wireless/orinoco/orinoco_usb.c

Simple merge