From 94fdc2e627d1b479a117cd8b9ece5f4613a5c956 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Thu, 6 Aug 2015 12:46:31 -0400 Subject: 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 Signed-off-by: Kalle Valo --- drivers/net/wireless/orinoco/main.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/net/wireless/orinoco/main.c') diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c index c410180479e6..7b5c554323c7 100644 --- a/drivers/net/wireless/orinoco/main.c +++ b/drivers/net/wireless/orinoco/main.c @@ -2321,8 +2321,6 @@ void free_orinocodev(struct orinoco_private *priv) struct orinoco_rx_data *rx_data, *temp; struct orinoco_scan_data *sd, *sdtemp; - wiphy_unregister(wiphy); - /* If the tasklet is scheduled when we call tasklet_kill it * will run one final time. However the tasklet will only * drain priv->rx_list if the hw is still available. */ -- cgit v1.2.3-70-g09d2