libertas: small return value handling cleanup

Dan Williams dcbw at localhost.unroutablelocaldomain
Tue Nov 28 02:56:38 EST 2006


Commit:     247567d3476d75794324ac07d971250062a8e5c4
Parent:     f086f1580e5dc2759301f59202e4a37b44b5ee29
commit 247567d3476d75794324ac07d971250062a8e5c4
Author:     Dan Williams <dcbw at localhost.localdomain>
AuthorDate: Wed Nov 15 12:05:25 2006 -0500
Commit:     Dan Williams <dcbw at localhost.localdomain>
CommitDate: Wed Nov 15 12:05:25 2006 -0500

    libertas: small return value handling cleanup
---
 drivers/net/wireless/libertas/wlan_scan.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/libertas/wlan_scan.c b/drivers/net/wireless/libertas/wlan_scan.c
index 80c8f3a..9804a6e 100644
--- a/drivers/net/wireless/libertas/wlan_scan.c
+++ b/drivers/net/wireless/libertas/wlan_scan.c
@@ -675,7 +675,7 @@ static int wlan_scan_channel_list(wlan_p
 	u8 scanBand;
 	int doneEarly;
 	int tlvIdx;
-	int ret;
+	int ret = 0;
 
 	ENTER();
 
@@ -685,8 +685,6 @@ static int wlan_scan_channel_list(wlan_p
 		return WLAN_STATUS_FAILURE;
 	}
 
-	ret = WLAN_STATUS_SUCCESS;
-
 	pChanTlvOut->Header.Type = wlan_cpu_to_le16(TLV_TYPE_CHANLIST);
 
 	/* Set the temp channel struct pointer to the start of the desired list */
@@ -777,12 +775,7 @@ static int wlan_scan_channel_list(wlan_p
 	}
 
 	LEAVE();
-
-	if (ret) {
-		return WLAN_STATUS_FAILURE;
-	}
-
-	return WLAN_STATUS_SUCCESS;
+	return ret;
 }
 
 /**


More information about the Commits-kernel mailing list