ipw2200: return error code on error in ipw_wx_get_auth()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Wed, 5 Dec 2012 08:08:11 +0000 (03:08 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 6 Dec 2012 19:58:55 +0000 (14:58 -0500)
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>
drivers/net/wireless/ipw2x00/ipw2200.c

index 482f505f3f3575e57ba8852db8c7c4abd7316cbf..b0879adcd441026e0e9ce90aad60779806d71397 100644 (file)
@@ -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:
@@ -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];