summaryrefslogtreecommitdiff
path: root/drivers/staging/wlan-ng
diff options
context:
space:
mode:
authorPeter Senna Tschudin <peter.senna@gmail.com>2014-05-26 16:08:50 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-26 10:32:15 -0700
commit4764ca981b040048766e4f39a45a4b9c5cecff9c (patch)
treeb4743d812ce65e2be8ca8e9190a0385029bff358 /drivers/staging/wlan-ng
parent9c73b46af4f74c255fbc26edebef8b2a61f2b7e4 (diff)
drivers/staging: Remove useless return variables
This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // <smpl> @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret when strict return - ret + C ; // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wlan-ng')
-rw-r--r--drivers/staging/wlan-ng/hfa384x_usb.c3
-rw-r--r--drivers/staging/wlan-ng/p80211req.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index f0ab5a27015e..98343ff70615 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -2642,7 +2642,6 @@ done:
----------------------------------------------------------------*/
int hfa384x_drvr_stop(hfa384x_t *hw)
{
- int result = 0;
int i;
might_sleep();
@@ -2667,7 +2666,7 @@ int hfa384x_drvr_stop(hfa384x_t *hw)
for (i = 0; i < HFA384x_NUMPORTS_MAX; i++)
hw->port_enabled[i] = 0;
- return result;
+ return 0;
}
/*----------------------------------------------------------------
diff --git a/drivers/staging/wlan-ng/p80211req.c b/drivers/staging/wlan-ng/p80211req.c
index 97795749a4ab..7221379c9742 100644
--- a/drivers/staging/wlan-ng/p80211req.c
+++ b/drivers/staging/wlan-ng/p80211req.c
@@ -95,7 +95,6 @@ static void p80211req_mibset_mibget(wlandevice_t *wlandev,
----------------------------------------------------------------*/
int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf)
{
- int result = 0;
struct p80211msg *msg = (struct p80211msg *) msgbuf;
/* Check to make sure the MSD is running */
@@ -129,7 +128,7 @@ int p80211req_dorequest(wlandevice_t *wlandev, u8 *msgbuf)
wlandev->mlmerequest(wlandev, msg);
clear_bit(1, &(wlandev->request_pending));
- return result; /* if result==0, msg->status still may contain an err */
+ return 0; /* if result==0, msg->status still may contain an err */
}
/*----------------------------------------------------------------