From: armadefuego@gmail.com Date: Tue, 22 Mar 2011 16:49:15 +0000 (-0700) Subject: orinoco: Clear dangling pointer on hardware busy X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a3ad38e87eead6ce748c6e4eec0571ce53b5a0c2;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 Signed-off-by: John W. Linville --- 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; }