From: Holger Schurig Date: Fri, 11 Sep 2009 08:13:55 +0000 (+0200) Subject: cfg80211: minimal error handling for wext-compat freq scanning X-Git-Tag: tegra-9.12.13.ER~1614^2~17^2~12 X-Git-Url: https://nv-tegra.nvidia.com/r/gitweb?p=linux-2.6.git;a=commitdiff_plain;h=8862dc5f25153a3c565a097220ed3de14ed72dfd cfg80211: minimal error handling for wext-compat freq scanning Signed-off-by: Holger Schurig Signed-off-by: John W. Linville --- 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;