Skip to content

Commit

Permalink
ipw2200: return error code on error in ipw_wx_get_auth()
Browse files Browse the repository at this point in the history
We have assinged error code to 'ret' when get auth from some
option is not supported but never used it, but we'd better return
the error code.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Wei Yongjun authored and John W. Linville committed Dec 6, 2012
1 parent 9304a1c commit 8df0f1e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/net/wireless/ipw2x00/ipw2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -6812,7 +6812,6 @@ static int ipw_wx_get_auth(struct net_device *dev,
struct libipw_device *ieee = priv->ieee;
struct lib80211_crypt_data *crypt;
struct iw_param *param = &wrqu->param;
int ret = 0;

switch (param->flags & IW_AUTH_INDEX) {
case IW_AUTH_WPA_VERSION:
Expand All @@ -6822,8 +6821,7 @@ static int ipw_wx_get_auth(struct net_device *dev,
/*
* wpa_supplicant will control these internally
*/
ret = -EOPNOTSUPP;
break;
return -EOPNOTSUPP;

case IW_AUTH_TKIP_COUNTERMEASURES:
crypt = priv->ieee->crypt_info.crypt[priv->ieee->crypt_info.tx_keyidx];
Expand Down

0 comments on commit 8df0f1e

Please sign in to comment.