summaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2011-06-29 22:49:33 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-07-05 15:26:51 -0400
commit3b4670ffe7824d1fc4db2f73101015056ecb4415 (patch)
treea67d37ac138195b25b8fde308898f5309209145c /net/wireless
parent3bff1865186c6bb97855f0c13e3850543dce9cef (diff)
downloadblackbird-op-linux-3b4670ffe7824d1fc4db2f73101015056ecb4415.tar.gz
blackbird-op-linux-3b4670ffe7824d1fc4db2f73101015056ecb4415.zip
net, wireless: Don't return uninitialized in __cfg80211_stop_sched_scan()
If the 'driver_initiated' function argument to __cfg80211_stop_sched_scan() is not 0 then we'll return an uninitialized 'err' from the function. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/scan.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 7a6c67667d70..5d23503dd5e0 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -132,7 +132,6 @@ EXPORT_SYMBOL(cfg80211_sched_scan_stopped);
int __cfg80211_stop_sched_scan(struct cfg80211_registered_device *rdev,
bool driver_initiated)
{
- int err;
struct net_device *dev;
ASSERT_RDEV_LOCK(rdev);
@@ -143,7 +142,7 @@ int __cfg80211_stop_sched_scan(struct cfg80211_registered_device *rdev,
dev = rdev->sched_scan_req->dev;
if (!driver_initiated) {
- err = rdev->ops->sched_scan_stop(&rdev->wiphy, dev);
+ int err = rdev->ops->sched_scan_stop(&rdev->wiphy, dev);
if (err)
return err;
}
@@ -153,7 +152,7 @@ int __cfg80211_stop_sched_scan(struct cfg80211_registered_device *rdev,
kfree(rdev->sched_scan_req);
rdev->sched_scan_req = NULL;
- return err;
+ return 0;
}
static void bss_release(struct kref *ref)
OpenPOWER on IntegriCloud