Skip to content

Commit 8862dc5

Browse files
Holger Schuriglinvjw
authored andcommitted
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>
1 parent a4e7b73 commit 8862dc5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎net/wireless/scan.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,11 @@ int cfg80211_wext_siwscan(struct net_device *dev,
675675
wext_freq_not_found: ;
676676
}
677677
}
678+
/* No channels found? */
679+
if (!i) {
680+
err = -EINVAL;
681+
goto out;
682+
}
678683

679684
/* Set real number of channels specified in creq->channels[] */
680685
creq->n_channels = i;

0 commit comments

Comments
 (0)