[PATCH 10/12] staging:wlan-ng: cleanup prism2sta_commsqual_defer and hfa384x_drvr_getconfig

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



the function prism2sta_commsqual_defer defines a goto done lable, which just
jumps to end of function, which we can achieve with out it

the hfa384x_drvr_getconfig doesn't need the result variable, we can
remove and just return the function

Signed-off-by: Devendra Naga <devendra.aaru@xxxxxxxxx>
---
 drivers/staging/wlan-ng/hfa384x_usb.c |    6 +-----
 drivers/staging/wlan-ng/prism2sta.c   |   15 ++++++---------
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c
index 25dd263..bdc63a6 100644
--- a/drivers/staging/wlan-ng/hfa384x_usb.c
+++ b/drivers/staging/wlan-ng/hfa384x_usb.c
@@ -2140,11 +2140,7 @@ exit_proc:
 ----------------------------------------------------------------*/
 int hfa384x_drvr_getconfig(hfa384x_t *hw, u16 rid, void *buf, u16 len)
 {
-	int result;
-
-	result = hfa384x_dorrid_wait(hw, rid, buf, len);
-
-	return result;
+	return hfa384x_dorrid_wait(hw, rid, buf, len);
 }
 
 /*----------------------------------------------------------------
diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c
index 1dfd9aa..32a2f66 100644
--- a/drivers/staging/wlan-ng/prism2sta.c
+++ b/drivers/staging/wlan-ng/prism2sta.c
@@ -1988,12 +1988,12 @@ void prism2sta_commsqual_defer(struct work_struct *data)
 	int result = 0;
 
 	if (hw->wlandev->hwremoved)
-		goto done;
+		return;
 
 	/* we don't care if we're in AP mode */
 	if ((wlandev->macmode == WLAN_MACMODE_NONE) ||
 	    (wlandev->macmode == WLAN_MACMODE_ESS_AP)) {
-		goto done;
+		return;
 	}
 
 	/* It only makes sense to poll these in non-IBSS */
@@ -2004,7 +2004,7 @@ void prism2sta_commsqual_defer(struct work_struct *data)
 
 		if (result) {
 			printk(KERN_ERR "error fetching commsqual\n");
-			goto done;
+			return;
 		}
 
 		pr_debug("commsqual %d %d %d\n",
@@ -2021,7 +2021,7 @@ void prism2sta_commsqual_defer(struct work_struct *data)
 	if (result) {
 		pr_debug("get signal rate failed, result = %d\n",
 			 result);
-		goto done;
+		return;
 	}
 
 	switch (mibitem->data) {
@@ -2048,7 +2048,7 @@ void prism2sta_commsqual_defer(struct work_struct *data)
 	if (result) {
 		pr_debug("getconfig(0x%02x) failed, result = %d\n",
 			 HFA384x_RID_CURRENTBSSID, result);
-		goto done;
+		return;
 	}
 
 	result = hfa384x_drvr_getconfig(hw,
@@ -2057,16 +2057,13 @@ void prism2sta_commsqual_defer(struct work_struct *data)
 	if (result) {
 		pr_debug("getconfig(0x%02x) failed, result = %d\n",
 			 HFA384x_RID_CURRENTSSID, result);
-		goto done;
+		return;
 	}
 	prism2mgmt_bytestr2pstr((hfa384x_bytestr_t *) &ssid,
 				(p80211pstrd_t *) &wlandev->ssid);
 
 	/* Reschedule timer */
 	mod_timer(&hw->commsqual_timer, jiffies + HZ);
-
-done:
-	;
 }
 
 void prism2sta_commsqual_timer(unsigned long data)
-- 
1.7.9.5

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux