Skip to contentSkip to conversation

staging: rtl8192e: Compress return logic into one line.

PATCH New Elise Lennion 1 participant 1 message Oct 17, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 staging: rtl8192e: Compress return logic into one line.

Simplify return logic to avoid unnecessary variable assignments.

Coccinelle was used with this semantic patch:
@@
local idexpression ret;
expression e;
@@

-ret =
+return

     e;

-return ret;

---
 drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c +1 -3
index 9aaa855..bbe3990 100644
@@ -202,7 +202,5 @@ bool rtl92e_init_fw(struct net_device *dev)
 
 download_firmware_fail:
 	netdev_err(dev, "%s: Failed to initialize firmware.\n", __func__);
-	rt_status = false;
-	return rt_status;
-
+	return false;
 }
Signature · 1 line
2.7.4