[PATCH] staging: rtl8712: rtl871x_security: Removed variables that is never used

From: Rickard Strandqvist
Date: Sat Jan 31 2015 - 09:53:58 EST


Variable was assigned a value that was never used.
I have also removed all the code that thereby serves no purpose.

This was found using a static code analysis program called cppcheck

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@xxxxxxxxxxxxxxxxxx>
---
drivers/staging/rtl8712/rtl871x_security.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl871x_security.c b/drivers/staging/rtl8712/rtl871x_security.c
index c653ad6..5852cab 100644
--- a/drivers/staging/rtl8712/rtl871x_security.c
+++ b/drivers/staging/rtl8712/rtl871x_security.c
@@ -222,7 +222,6 @@ void r8712_wep_encrypt(struct _adapter *padapter, u8 *pxmitframe)
void r8712_wep_decrypt(struct _adapter *padapter, u8 *precvframe)
{
/* exclude ICV */
- u8 crc[4];
struct arc4context mycontext;
u32 length, keylength;
u8 *pframe, *payload, *iv, wepkey[16];
@@ -249,8 +248,6 @@ void r8712_wep_decrypt(struct _adapter *padapter, u8 *precvframe)
/* decrypt payload include icv */
arcfour_init(&mycontext, wepkey, 3 + keylength);
arcfour_encrypt(&mycontext, payload, payload, length);
- /* calculate icv and compare the icv */
- *((u32 *)crc) = cpu_to_le32(getcrc32(payload, length - 4));
}
}

--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/