diff options
| author | Kang Minchul <tegongkang@gmail.com> | 2022-10-26 02:06:19 +0900 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-10-31 09:05:17 +0100 |
| commit | f67469fe658a484f8c000bfcf66a191417bd6e30 (patch) | |
| tree | b9a1089b807ea681178fcc0f2903f2d3927160f4 | |
| parent | cbcab58a7cbf51e0e1e8e5dec0bd44be48e966db (diff) | |
| download | linux-f67469fe658a484f8c000bfcf66a191417bd6e30.tar.gz linux-f67469fe658a484f8c000bfcf66a191417bd6e30.zip | |
staging: r8188eu: remove unnecessary vaiable in rtw_recv
Return _SUCCESS directly instead of storing it in a variable.
This can prevent cocci warning as follows:
Unneeded variable: "ret". Return "_SUCCESS" on line 1516
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Kang Minchul <tegongkang@gmail.com>
Link: https://lore.kernel.org/r/20221025170621.271903-3-tegongkang@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/r8188eu/core/rtw_recv.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c index 4b68a543f68b..94f85cd7038d 100644 --- a/drivers/staging/r8188eu/core/rtw_recv.c +++ b/drivers/staging/r8188eu/core/rtw_recv.c @@ -1415,7 +1415,6 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe) struct recv_priv *precvpriv = &padapter->recvpriv; struct __queue *pfree_recv_queue = &precvpriv->free_recv_queue; - int ret = _SUCCESS; nr_subframes = 0; @@ -1513,7 +1512,7 @@ exit: prframe->len = 0; rtw_free_recvframe(prframe, pfree_recv_queue);/* free this recv_frame */ - return ret; + return _SUCCESS; } static bool check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_num) |
