From: Rehas Sachdeva Date: Mon, 19 Sep 2016 19:35:54 +0000 (+0530) Subject: staging: wlan-ng: Remove unnecessary variable usage X-Git-Tag: v4.9-rc1~119^2~295 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=f4353ee3d3af22641beb99a146ef136f33952e80;p=linux.git staging: wlan-ng: Remove unnecessary variable usage 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c index 73ea1277d08b..b380c7d119a7 100644 --- a/drivers/staging/wlan-ng/prism2mgmt.c +++ b/drivers/staging/wlan-ng/prism2mgmt.c @@ -685,9 +685,7 @@ int prism2mgmt_start(struct wlandevice *wlandev, void *msgp) msg->resultcode.data = P80211ENUM_resultcode_invalid_parameters; done: - result = 0; - - return result; + return 0; } /*----------------------------------------------------------------