Commit 8862dc5f authored by Holger Schurig's avatar Holger Schurig Committed by John W. Linville

cfg80211: minimal error handling for wext-compat freq scanning

Signed-off-by: default avatarHolger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent a4e7b730
...@@ -675,6 +675,11 @@ int cfg80211_wext_siwscan(struct net_device *dev, ...@@ -675,6 +675,11 @@ int cfg80211_wext_siwscan(struct net_device *dev,
wext_freq_not_found: ; wext_freq_not_found: ;
} }
} }
/* No channels found? */
if (!i) {
err = -EINVAL;
goto out;
}
/* Set real number of channels specified in creq->channels[] */ /* Set real number of channels specified in creq->channels[] */
creq->n_channels = i; creq->n_channels = i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment