staging: rtl8712: amsdu_to_msdu(): Change return type
authorNishka Dasgupta <nishkadg.linux@gmail.com>
Thu, 8 Aug 2019 06:40:03 +0000 (12:10 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Aug 2019 17:58:14 +0000 (19:58 +0200)
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>
drivers/staging/rtl8712/rtl8712_recv.c

index eb9a4a5ed7406ad7828533761fdec53fdc5c2abc..42372e7e76ac60bad453928b23eed58517341cbd 100644 (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;