All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8712: rtl871x_security: Removed variables that is never used
@ 2015-01-31 14:57 Rickard Strandqvist
  0 siblings, 0 replies; only message in thread
From: Rickard Strandqvist @ 2015-01-31 14:57 UTC (permalink / raw)
  To: Larry Finger, Florian Schilhabel
  Cc: Rickard Strandqvist, Greg Kroah-Hartman, Marcus Farkas,
	Tapasweni Pathak, Sudip Mukherjee, Dan Carpenter, devel,
	linux-kernel

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@spectrumdigital.se>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-01-31 14:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-31 14:57 [PATCH] staging: rtl8712: rtl871x_security: Removed variables that is never used Rickard Strandqvist

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.