]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: wlan-ng: remove unused variable
authorAya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Fri, 27 Feb 2015 12:49:27 +0000 (14:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Mar 2015 00:23:55 +0000 (16:23 -0800)
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.

The issue was detected and resolved using the following
coccinelle script:

@@
identifier len,f;
@@

-int len;
 ... when != len
     when strict
-len =
+return
        f(...);
-return len;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlan-ng/prism2sta.c

index 10ad24a89ddd24c30913e14be13f6cd15ca0bee0..77e0f896bd494dcf42313d34582c360bd7b9795d 100644 (file)
@@ -243,7 +243,6 @@ static int prism2sta_txframe(wlandevice_t *wlandev, struct sk_buff *skb,
                             struct p80211_metawep *p80211_wep)
 {
        hfa384x_t *hw = (hfa384x_t *) wlandev->priv;
-       int result;
 
        /* If necessary, set the 802.11 WEP bit */
        if ((wlandev->hostwep & (HOSTWEP_PRIVACYINVOKED | HOSTWEP_ENCRYPT)) ==
@@ -251,9 +250,7 @@ static int prism2sta_txframe(wlandevice_t *wlandev, struct sk_buff *skb,
                p80211_hdr->a3.fc |= cpu_to_le16(WLAN_SET_FC_ISWEP(1));
        }
 
-       result = hfa384x_drvr_txframe(hw, skb, p80211_hdr, p80211_wep);
-
-       return result;
+       return hfa384x_drvr_txframe(hw, skb, p80211_hdr, p80211_wep);
 }
 
 /*----------------------------------------------------------------