[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1422716234-3417-1-git-send-email-rickard_strandqvist@spectrumdigital.se>
Date: Sat, 31 Jan 2015 15:57:14 +0100
From: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To: Larry Finger <Larry.Finger@...inger.net>,
Florian Schilhabel <florian.c.schilhabel@...glemail.com>
Cc: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Marcus Farkas <marcus.farkas@...itebox.com>,
Tapasweni Pathak <tapaswenipathak@...il.com>,
Sudip Mukherjee <sudipm.mukherjee@...il.com>,
Dan Carpenter <dan.carpenter@...cle.com>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH] staging: rtl8712: rtl871x_security: Removed variables that is never used
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@...ctrumdigital.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists