diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2009-09-11 08:13:55 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-09-23 15:35:39 (GMT) |
commit | 012a1b3e5e3561376dacf07efee15688284302c6 (patch) | |
tree | 9970293afe1d5a390573e32035cf8719a7ba7e16 /net | |
parent | 50425b0977c53c6ac608f0b2c8a562a5c7cd5602 (diff) | |
download | linux-fsl-qoriq-012a1b3e5e3561376dacf07efee15688284302c6.tar.xz |
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.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 6c20b65..e5f92ee 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; |