diff options
author | Saurav Girepunje <saurav.girepunje@gmail.com> | 2021-10-25 17:45:10 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-26 18:45:41 +0200 |
commit | b6f8bd68120faebfa04c4ba34845bf8498eaf868 (patch) | |
tree | d5edd599b29d9922f9e5fdd8b763d1708a111cb1 /drivers/staging | |
parent | f3d90f5139e59e04ed50ee72a01f73863e5dcc70 (diff) |
staging: r8188eu: core: remove goto statement
Remove the goto statement from rtw_do_join(). In this function goto
can be replace by return statement. As on goto label exit, function only
return it is not performing any cleanup. Avoiding goto will improve
the function readability.
Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
Link: https://lore.kernel.org/r/YXafzp5F8T7/+tk2@Sauravs-MacBook-Air.local
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/r8188eu/core/rtw_ioctl_set.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_ioctl_set.c b/drivers/staging/r8188eu/core/rtw_ioctl_set.c index 2b54cdfa9d6e..411b06e135be 100644 --- a/drivers/staging/r8188eu/core/rtw_ioctl_set.c +++ b/drivers/staging/r8188eu/core/rtw_ioctl_set.c @@ -51,7 +51,7 @@ u8 rtw_do_join(struct adapter *padapter) ret = _FAIL; } - goto exit; + return ret; } else { int select_ret; @@ -78,10 +78,9 @@ u8 rtw_do_join(struct adapter *padapter) rtw_generate_random_ibss(pibss); - if (rtw_createbss_cmd(padapter) != _SUCCESS) { - ret = false; - goto exit; - } + if (rtw_createbss_cmd(padapter) != _SUCCESS) + return false; + pmlmepriv->to_join = false; } else { /* can't associate ; reset under-linking */ @@ -102,8 +101,6 @@ u8 rtw_do_join(struct adapter *padapter) } } -exit: - return ret; } |