staging: r8188eu: make xmitframe_swencrypt a void function
authorMartin Kaiser <martin@kaiser.cx>
Fri, 30 Dec 2022 18:06:27 +0000 (19:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Jan 2023 18:31:21 +0000 (19:31 +0100)
xmitframe_swencrypt always returns _SUCCESS and the caller does not check
the return value. We can remove the return value and make
xmitframe_swencrypt a void function.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Link: https://lore.kernel.org/r/20221230180646.91008-2-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_xmit.c

index 36ce1e3f9c81e1754cc52fb80f2008c17c678a92..55c65875b92385560ba76c41397b134f78980579 100644 (file)
@@ -761,7 +761,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
        return _SUCCESS;
 }
 
-static s32 xmitframe_swencrypt(struct adapter *padapter, struct xmit_frame *pxmitframe)
+static void xmitframe_swencrypt(struct adapter *padapter, struct xmit_frame *pxmitframe)
 {
        struct  pkt_attrib       *pattrib = &pxmitframe->attrib;
 
@@ -781,8 +781,6 @@ static s32 xmitframe_swencrypt(struct adapter *padapter, struct xmit_frame *pxmi
                        break;
                }
        }
-
-       return _SUCCESS;
 }
 
 s32 rtw_make_wlanhdr(struct adapter *padapter, u8 *hdr, struct pkt_attrib *pattrib)