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

staging: rtl8712: r8712_tkip_decrypt(): Change return type

Change return type of r8712_tkip_decrypt from u8 to void as the
return value is never used. Modify or remove return statements
accordingly.

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

authored by

Nishka Dasgupta and committed by
Greg Kroah-Hartman
f8dbe3f0 dcca75a4

+3 -11
+2 -10
drivers/staging/rtl8712/rtl871x_security.c
··· 636 636 } 637 637 638 638 /* The hlen doesn't include the IV */ 639 - u32 r8712_tkip_decrypt(struct _adapter *padapter, u8 *precvframe) 639 + void r8712_tkip_decrypt(struct _adapter *padapter, u8 *precvframe) 640 640 { /* exclude ICV */ 641 641 u16 pnl; 642 642 u32 pnh; ··· 670 670 prwskey = &psecuritypriv->XGrpKey[ 671 671 ((idx >> 6) & 0x3) - 1].skey[0]; 672 672 if (!psecuritypriv->binstallGrpkey) 673 - return _FAIL; 673 + return; 674 674 } else { 675 675 prwskey = &stainfo->x_UncstKey.skey[0]; 676 676 } ··· 686 686 arcfour_encrypt(&mycontext, payload, payload, length); 687 687 *((__le32 *)crc) = cpu_to_le32(getcrc32(payload, 688 688 length - 4)); 689 - if (crc[3] != payload[length - 1] || 690 - crc[2] != payload[length - 2] || 691 - crc[1] != payload[length - 3] || 692 - crc[0] != payload[length - 4]) 693 - return _FAIL; 694 - } else { 695 - return _FAIL; 696 689 } 697 690 } 698 - return _SUCCESS; 699 691 } 700 692 701 693 /* 3 =====AES related===== */
+1 -1
drivers/staging/rtl8712/rtl871x_security.h
··· 210 210 u32 r8712_tkip_encrypt(struct _adapter *padapter, u8 *pxmitframe); 211 211 void r8712_wep_encrypt(struct _adapter *padapter, u8 *pxmitframe); 212 212 u32 r8712_aes_decrypt(struct _adapter *padapter, u8 *precvframe); 213 - u32 r8712_tkip_decrypt(struct _adapter *padapter, u8 *precvframe); 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); 216 216