Skip to content

Commit

Permalink
cfg80211: minimal error handling for wext-compat freq scanning
Browse files Browse the repository at this point in the history
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Holger Schurig authored and John W. Linville committed Sep 23, 2009
1 parent 50425b0 commit 012a1b3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions net/wireless/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 012a1b3

Please sign in to comment.