diff options
author | Ilan Peer <ilan.peer@intel.com> | 2023-07-23 23:10:43 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-11 12:08:11 +0200 |
commit | 7a6fad03f54c3fd007a075fa58b75789ff12f227 (patch) | |
tree | 89f27f78f1fb0ee429c05ee556ee5b712de3f345 | |
parent | 05e0952ddb75abef20cdb585060584f8d8f0bc4a (diff) | |
download | linux-7a6fad03f54c3fd007a075fa58b75789ff12f227.tar.gz linux-7a6fad03f54c3fd007a075fa58b75789ff12f227.tar.bz2 linux-7a6fad03f54c3fd007a075fa58b75789ff12f227.zip |
wifi: cfg80211: Fix return value in scan logic
[ Upstream commit fd7f08d92fcd7cc3eca0dd6c853f722a4c6176df ]
The reporter noticed a warning when running iwlwifi:
WARNING: CPU: 8 PID: 659 at mm/page_alloc.c:4453 __alloc_pages+0x329/0x340
As cfg80211_parse_colocated_ap() is not expected to return a negative
value return 0 and not a negative value if cfg80211_calc_short_ssid()
fails.
Fixes: c8cb5b854b40f ("nl80211/cfg80211: support 6 GHz scanning")
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217675
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230723201043.3007430-1-ilan.peer@intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
-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 efe9283e9893..e5c1510c098f 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -643,7 +643,7 @@ static int cfg80211_parse_colocated_ap(const struct cfg80211_bss_ies *ies, ret = cfg80211_calc_short_ssid(ies, &ssid_elem, &s_ssid_tmp); if (ret) - return ret; + return 0; /* RNR IE may contain more than one NEIGHBOR_AP_INFO */ while (pos + sizeof(*ap_info) <= end) { |