staging: r8188eu: convert aes_cipher() to void
authorMichael Straube <straube.linux@gmail.com>
Fri, 11 Nov 2022 08:37:30 +0000 (09:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Nov 2022 18:48:46 +0000 (19:48 +0100)
The function aes_cipher() returns always _SUCCESS and its callers
do not use the return value. So we can convert the return type to
void and get rid of another use of _SUCCESS.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20221111083733.3144-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/core/rtw_security.c

index 5bba57d18b5fc601c31d757acef90502bea84146..780019ce1b983e302f45e8116a4efc6cadc6f3ab 100644 (file)
@@ -954,7 +954,7 @@ static void bitwise_xor(u8 *ina, u8 *inb, u8 *out)
 
 }
 
-static int aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen)
+static void aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen)
 {
        uint    qc_exists, a4_exists, i, j, payload_remainder,
                num_blocks, payload_index;
@@ -1083,8 +1083,6 @@ static int aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen)
        bitwise_xor(aes_out, padded_buffer, chain_buffer);
        for (j = 0; j < 8; j++)
                pframe[payload_index++] = chain_buffer[j];
-
-       return _SUCCESS;
 }
 
 u32 rtw_aes_encrypt(struct adapter *padapter, struct xmit_frame *pxmitframe)