staging: rtl8712: aes_decipher(): Change return type
authorNishka Dasgupta <nishkadg.linux@gmail.com>
Fri, 2 Aug 2019 06:42:11 +0000 (12:12 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Aug 2019 12:00:57 +0000 (14:00 +0200)
Change return type of aes_decipher from sint to void as it always
returns _SUCCESS and this value is never used.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190802064212.30476-8-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl871x_security.c

index 8f3781c5dd2568b3793a98105a751d3186d3d0da..bf55a697dd5f25ff9438b04be6bfff177c4d652f 100644 (file)
@@ -1184,8 +1184,8 @@ u32 r8712_aes_encrypt(struct _adapter *padapter, u8 *pxmitframe)
        return res;
 }
 
-static sint aes_decipher(u8 *key, uint hdrlen,
-                       u8 *pframe, uint plen)
+static void aes_decipher(u8 *key, uint hdrlen,
+                        u8 *pframe, uint plen)
 {
        static u8 message[MAX_MSG_SIZE];
        uint qc_exists, a4_exists, i, j, payload_remainder;
@@ -1339,7 +1339,6 @@ static sint aes_decipher(u8 *key, uint    hdrlen,
        for (j = 0; j < 8; j++)
                message[payload_index++] = chain_buffer[j];
        /* compare the mic */
-       return _SUCCESS;
 }
 
 u32 r8712_aes_decrypt(struct _adapter *padapter, u8 *precvframe)