summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorHolger Schurig <hs4233@mail.mn-solutions.de>2009-09-11 10:13:55 +0200
committerJohn W. Linville <linville@tuxdriver.com>2009-09-14 14:36:04 -0400
commit8862dc5f25153a3c565a097220ed3de14ed72dfd (patch)
treefa2afcc9c6ae9bf6388aaab65ddc8dca41f089cf /net
parenta4e7b730f1c8c9179def7033a024183c58cf2538 (diff)
downloadlinux-3.10-8862dc5f25153a3c565a097220ed3de14ed72dfd.tar.gz
linux-3.10-8862dc5f25153a3c565a097220ed3de14ed72dfd.tar.bz2
linux-3.10-8862dc5f25153a3c565a097220ed3de14ed72dfd.zip
cfg80211: minimal error handling for wext-compat freq scanning
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/scan.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 6c20b6515ab..e5f92ee758f 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -675,6 +675,11 @@ int cfg80211_wext_siwscan(struct net_device *dev,
wext_freq_not_found: ;
}
}
+ /* No channels found? */
+ if (!i) {
+ err = -EINVAL;
+ goto out;
+ }
/* Set real number of channels specified in creq->channels[] */
creq->n_channels = i;