staging: wilc1000: handle connecting error

If connection fails, wilc1000_connecting needs to be set false also and return
immediately because goto lable 'done' doesn't do anything. Remove lable 'done'
as well.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Glen Lee 2016-02-04 18:15:21 +09:00 committed by Greg Kroah-Hartman
parent ff9d65abc8
commit 430e640d6d
1 changed files with 6 additions and 7 deletions

View File

@ -757,8 +757,8 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
PRINT_D(CFG80211_DBG, "No Scan results yet\n"); PRINT_D(CFG80211_DBG, "No Scan results yet\n");
else else
PRINT_D(CFG80211_DBG, "Required bss not in scan results: Error(%d)\n", s32Error); PRINT_D(CFG80211_DBG, "Required bss not in scan results: Error(%d)\n", s32Error);
wilc_connecting = 0;
goto done; return s32Error;
} }
priv->WILC_WFI_wep_default = 0; priv->WILC_WFI_wep_default = 0;
@ -845,8 +845,8 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
} else { } else {
s32Error = -ENOTSUPP; s32Error = -ENOTSUPP;
PRINT_ER("Not supported cipher: Error(%d)\n", s32Error); PRINT_ER("Not supported cipher: Error(%d)\n", s32Error);
wilc_connecting = 0;
goto done; return s32Error;
} }
} }
@ -912,11 +912,10 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
if (s32Error != 0) { if (s32Error != 0) {
PRINT_ER("wilc_set_join_req(): Error(%d)\n", s32Error); PRINT_ER("wilc_set_join_req(): Error(%d)\n", s32Error);
s32Error = -ENOENT; s32Error = -ENOENT;
goto done; wilc_connecting = 0;
return s32Error;
} }
done:
return s32Error; return s32Error;
} }