Skip to content

Commit

Permalink
net, wireless: Don't return uninitialized in __cfg80211_stop_sched_sc…
Browse files Browse the repository at this point in the history
…an()

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>
  • Loading branch information
Jesper Juhl authored and John W. Linville committed Jul 5, 2011
1 parent 3bff186 commit 3b4670f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions net/wireless/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}
Expand All @@ -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)
Expand Down

0 comments on commit 3b4670f

Please sign in to comment.