public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8188eu: core: rtw_sta_mgt: Removed variables that is never used
@ 2015-01-31 14:45 Rickard Strandqvist
  2015-01-31 16:19 ` Dan Carpenter
  2015-02-01  4:20 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 5+ messages in thread
From: Rickard Strandqvist @ 2015-01-31 14:45 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Larry Finger
  Cc: Rickard Strandqvist, navin patidar, Jia He, 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/rtl8188eu/core/rtw_sta_mgt.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
index dc9d0dd..1e737ed 100644
--- a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
+++ b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
@@ -149,7 +149,6 @@ inline struct sta_info *rtw_get_stainfo_by_offset(struct sta_priv *stapriv, int
 static void rtw_mfree_all_stainfo(struct sta_priv *pstapriv)
 {
 	struct list_head *plist, *phead;
-	struct sta_info *psta = NULL;
 
 
 	spin_lock_bh(&pstapriv->sta_hash_lock);
@@ -158,7 +157,7 @@ static void rtw_mfree_all_stainfo(struct sta_priv *pstapriv)
 	plist = phead->next;
 
 	while (phead != plist) {
-		psta = container_of(plist, struct sta_info , list);
+		container_of(plist, struct sta_info, list);
 		plist = plist->next;
 	}
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-01  4:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-31 14:45 [PATCH] staging: rtl8188eu: core: rtw_sta_mgt: Removed variables that is never used Rickard Strandqvist
2015-01-31 16:19 ` Dan Carpenter
2015-01-31 17:41   ` Larry Finger
2015-02-01  4:21     ` Greg Kroah-Hartman
2015-02-01  4:20 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox