staging: rtl8712: amsdu_to_msdu(): Change return type

Change return type of amsdu_to_msdu from int to void as it always
returns _SUCCESS. Remove return statement as well.
As this return value was never anything other than _SUCCESS, remove the
if-branch that depends on the return value not being _SUCCESS.
Remove local variable that was only used in the now-removed if-branch
Modify call site to call the function amsdu_to_msdu without expecting
a return value.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190808064012.12661-1-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Nishka Dasgupta 2019-08-08 12:10:03 +05:30 committed by Greg Kroah-Hartman
parent a9ca0c5951
commit fc898688aa

View File

@ -318,7 +318,7 @@ union recv_frame *r8712_recvframe_chk_defrag(struct _adapter *padapter,
return prtnframe;
}
static int amsdu_to_msdu(struct _adapter *padapter, union recv_frame *prframe)
static void amsdu_to_msdu(struct _adapter *padapter, union recv_frame *prframe)
{
int a_len, padding_len;
u16 eth_type, nSubframe_Length;
@ -416,7 +416,6 @@ static int amsdu_to_msdu(struct _adapter *padapter, union recv_frame *prframe)
exit:
prframe->u.hdr.len = 0;
r8712_free_recvframe(prframe, pfree_recv_queue);
return _SUCCESS;
}
void r8712_rxcmd_event_hdl(struct _adapter *padapter, void *prxcmdbuf)
@ -506,7 +505,6 @@ int r8712_recv_indicatepkts_in_order(struct _adapter *padapter,
union recv_frame *prframe;
struct rx_pkt_attrib *pattrib;
int bPktInBuf = false;
struct recv_priv *precvpriv = &padapter->recvpriv;
struct __queue *ppending_recvframe_queue =
&preorder_ctrl->pending_recvframe_queue;
@ -543,10 +541,7 @@ int r8712_recv_indicatepkts_in_order(struct _adapter *padapter,
prframe);
}
} else if (pattrib->amsdu == 1) {
if (amsdu_to_msdu(padapter, prframe) !=
_SUCCESS)
r8712_free_recvframe(prframe,
&precvpriv->free_recv_queue);
amsdu_to_msdu(padapter, prframe);
}
/* Update local variables. */
bPktInBuf = false;