diff options
author | Luciano Coelho <coelho@ti.com> | 2011-07-08 12:16:16 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-08 19:47:54 +0400 |
commit | 1a84ff7564ae43dd1ea20e17f867de2700ca5b5b (patch) | |
tree | d49c7eece59a016b2bdf9c43bc86bfcd46472708 /net/wireless/scan.c | |
parent | 331c5ea2d92c76bfe58a9bb5e6d21160850a29bc (diff) | |
download | linux-1a84ff7564ae43dd1ea20e17f867de2700ca5b5b.tar.xz |
cfg80211: return -ENOENT when stopping sched_scan while not running
If we try to stop a scheduled scan while it is not running, we should
return -ENOENT instead of simply ignoring the command and returning
success. This is more consistent with other parts of the code.
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/scan.c')
-rw-r--r-- | net/wireless/scan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 5d23503dd5e0..ce04566a2ecc 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -137,7 +137,7 @@ int __cfg80211_stop_sched_scan(struct cfg80211_registered_device *rdev, ASSERT_RDEV_LOCK(rdev); if (!rdev->sched_scan_req) - return 0; + return -ENOENT; dev = rdev->sched_scan_req->dev; |