summaryrefslogtreecommitdiff
path: root/net/wireless
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2019-10-08 19:43:50 +0300
committerJohannes Berg <johannes.berg@intel.com>2019-10-11 11:29:53 +0300
commit2fd351a8772d6eae4800925b17228c9f2d276193 (patch)
treea8e7917804f87702e98787d2394419b3b54c8876 /net/wireless
parent2ce113de31320756b25179f3f4512a522bc45263 (diff)
downloadlinux-2fd351a8772d6eae4800925b17228c9f2d276193.tar.xz
nl80211: trivial: Remove redundant loop
cfg80211_assign_cookie already checks & prevents a 0 from being returned, so the explicit loop is unnecessary. Signed-off-by: Denis Kenzior <denkenz@gmail.com> Link: https://lore.kernel.org/r/20191008164350.2836-1-denkenz@gmail.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/nl80211.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index d21b1581a665..57bade7ea41c 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -8227,10 +8227,8 @@ static int nl80211_start_sched_scan(struct sk_buff *skb,
/* leave request id zero for legacy request
* or if driver does not support multi-scheduled scan
*/
- if (want_multi && rdev->wiphy.max_sched_scan_reqs > 1) {
- while (!sched_scan_req->reqid)
- sched_scan_req->reqid = cfg80211_assign_cookie(rdev);
- }
+ if (want_multi && rdev->wiphy.max_sched_scan_reqs > 1)
+ sched_scan_req->reqid = cfg80211_assign_cookie(rdev);
err = rdev_sched_scan_start(rdev, dev, sched_scan_req);
if (err)