OSDN Git Service

staging: wlan-ng: Remove unnecessary variable usage
authorRehas Sachdeva <aquannie@gmail.com>
Mon, 19 Sep 2016 19:35:54 +0000 (01:05 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Sep 2016 11:59:45 +0000 (13:59 +0200)
Instead of storing the return value 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;

Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wlan-ng/prism2mgmt.c

index 73ea127..b380c7d 100644 (file)
@@ -685,9 +685,7 @@ failed:
        msg->resultcode.data = P80211ENUM_resultcode_invalid_parameters;
 
 done:
-       result = 0;
-
-       return result;
+       return 0;
 }
 
 /*----------------------------------------------------------------