Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: rtl8712: r8712_aes_decrypt(): Change return type

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>

authored by

Nishka Dasgupta and committed by
Greg Kroah-Hartman
b35105a3 eb43590f

+3 -6
+2 -5
drivers/staging/rtl8712/rtl871x_security.c
··· 1341 1341 /* compare the mic */ 1342 1342 } 1343 1343 1344 - u32 r8712_aes_decrypt(struct _adapter *padapter, u8 *precvframe) 1344 + void r8712_aes_decrypt(struct _adapter *padapter, u8 *precvframe) 1345 1345 { /* exclude ICV */ 1346 1346 /* Intermediate Buffers */ 1347 1347 sint length; ··· 1364 1364 prwskey = &psecuritypriv->XGrpKey[ 1365 1365 ((idx >> 6) & 0x3) - 1].skey[0]; 1366 1366 if (!psecuritypriv->binstallGrpkey) 1367 - return _FAIL; 1367 + return; 1368 1368 1369 1369 } else { 1370 1370 prwskey = &stainfo->x_UncstKey.skey[0]; ··· 1374 1374 prxattrib->iv_len; 1375 1375 aes_decipher(prwskey, prxattrib->hdrlen, pframe, 1376 1376 length); 1377 - } else { 1378 - return _FAIL; 1379 1377 } 1380 1378 } 1381 - return _SUCCESS; 1382 1379 } 1383 1380 1384 1381 void r8712_use_tkipkey_handler(struct timer_list *t)
+1 -1
drivers/staging/rtl8712/rtl871x_security.h
··· 209 209 u32 r8712_aes_encrypt(struct _adapter *padapter, u8 *pxmitframe); 210 210 u32 r8712_tkip_encrypt(struct _adapter *padapter, u8 *pxmitframe); 211 211 void r8712_wep_encrypt(struct _adapter *padapter, u8 *pxmitframe); 212 - u32 r8712_aes_decrypt(struct _adapter *padapter, u8 *precvframe); 212 + void r8712_aes_decrypt(struct _adapter *padapter, u8 *precvframe); 213 213 void r8712_tkip_decrypt(struct _adapter *padapter, u8 *precvframe); 214 214 void r8712_wep_decrypt(struct _adapter *padapter, u8 *precvframe); 215 215 void r8712_use_tkipkey_handler(struct timer_list *t);