summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorarmadefuego@gmail.com2011-03-22 17:49:15 +0100
committerJohn W. Linville2011-03-23 20:22:04 +0100
commita3ad38e87eead6ce748c6e4eec0571ce53b5a0c2 (patch)
tree903f4ebdba3785fca05c73c90d186f58431ed22e /drivers/net/wireless
parentiwlagn: fix error in command waiting (diff)
downloadkernel-qcow2-linux-a3ad38e87eead6ce748c6e4eec0571ce53b5a0c2.tar.gz
kernel-qcow2-linux-a3ad38e87eead6ce748c6e4eec0571ce53b5a0c2.tar.xz
kernel-qcow2-linux-a3ad38e87eead6ce748c6e4eec0571ce53b5a0c2.zip
orinoco: Clear dangling pointer on hardware busy
On hardware busy the scan request pointer should be cleared, as higher levels will release. This avoids a crash when that pointer is erroneously used later. Signed-off-by: Joseph J. Gunn <armadefuego@yahoo.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/orinoco/cfg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/orinoco/cfg.c b/drivers/net/wireless/orinoco/cfg.c
index 09fae2f0ea08..736bbb9bd1d0 100644
--- a/drivers/net/wireless/orinoco/cfg.c
+++ b/drivers/net/wireless/orinoco/cfg.c
@@ -153,6 +153,9 @@ static int orinoco_scan(struct wiphy *wiphy, struct net_device *dev,
priv->scan_request = request;
err = orinoco_hw_trigger_scan(priv, request->ssids);
+ /* On error the we aren't processing the request */
+ if (err)
+ priv->scan_request = NULL;
return err;
}