staging: rtl8712: r8712_aes_decrypt(): Change return type
authorNishka Dasgupta <nishkadg.linux@gmail.com>
Fri, 2 Aug 2019 06:42:12 +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 r8712_aes_decrypt from u8 to void as its return
value is never checked. Modify return statements accordingly.

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

index bf55a697dd5f25ff9438b04be6bfff177c4d652f..73e3d5ef3af27e2d4d9927f6416911c2494dea79 100644 (file)
@@ -1341,7 +1341,7 @@ static void aes_decipher(u8 *key, uint hdrlen,
        /* compare the mic */
 }
 
-u32 r8712_aes_decrypt(struct _adapter *padapter, u8 *precvframe)
+void r8712_aes_decrypt(struct _adapter *padapter, u8 *precvframe)
 {      /* exclude ICV */
        /* Intermediate Buffers */
        sint            length;
@@ -1364,7 +1364,7 @@ u32 r8712_aes_decrypt(struct _adapter *padapter, u8 *precvframe)
                                prwskey = &psecuritypriv->XGrpKey[
                                          ((idx >> 6) & 0x3) - 1].skey[0];
                                if (!psecuritypriv->binstallGrpkey)
-                                       return _FAIL;
+                                       return;
 
                        } else {
                                prwskey = &stainfo->x_UncstKey.skey[0];
@@ -1374,11 +1374,8 @@ u32 r8712_aes_decrypt(struct _adapter *padapter, u8 *precvframe)
                                 prxattrib->iv_len;
                        aes_decipher(prwskey, prxattrib->hdrlen, pframe,
                                     length);
-               } else {
-                       return _FAIL;
                }
        }
-       return _SUCCESS;
 }
 
 void r8712_use_tkipkey_handler(struct timer_list *t)
index 25220afa61e93eec7353abcb7a5add874ccfbc94..b2dda16cbd0a9b93f0bc0bceb69350fafa9a873c 100644 (file)
@@ -209,7 +209,7 @@ void r8712_secgetmic(struct mic_data *pmicdata, u8 *dst);
 u32 r8712_aes_encrypt(struct _adapter *padapter, u8 *pxmitframe);
 u32 r8712_tkip_encrypt(struct _adapter *padapter, u8 *pxmitframe);
 void r8712_wep_encrypt(struct _adapter *padapter, u8  *pxmitframe);
-u32 r8712_aes_decrypt(struct _adapter *padapter, u8  *precvframe);
+void r8712_aes_decrypt(struct _adapter *padapter, u8  *precvframe);
 void r8712_tkip_decrypt(struct _adapter *padapter, u8  *precvframe);
 void r8712_wep_decrypt(struct _adapter *padapter, u8  *precvframe);
 void r8712_use_tkipkey_handler(struct timer_list *t);