Skip to contentSkip to conversation

staging: wlan-ng: Remove unnecessary return capture

PATCH New Rehas Sachdeva 1 participant 1 message Sep 19, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: wlan-ng: Remove unnecessary return capture

Instead of storing the return value of a function call into a variable and then returning it, we can club the two into a single return statement. This change was made using the following semantic patch by Coccinelle:

@@
local idexpression ret;
expression e;
@@

-ret =
+return

     e;

-return ret;

---
 drivers/staging/wlan-ng/prism2mgmt.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/wlan-ng/prism2mgmt.c +1 -3
index 73ea127..b380c7d 100644
@@ -685,9 +685,7 @@ failed:
 	msg->resultcode.data = P80211ENUM_resultcode_invalid_parameters;
 
 done:
-	result = 0;
-
-	return result;
+	return 0;
 }
 
 /*----------------------------------------------------------------
Signature · 1 line
2.7.4