staging: rtl8192e: Compress return logic into one line.
authorElise Lennion <elise.lennion@gmail.com>
Mon, 17 Oct 2016 02:15:47 +0000 (00:15 -0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Oct 2016 08:27:55 +0000 (10:27 +0200)
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;

Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c

index 9aaa85526eb8d3ae1086f4fadd6ff2e3d018e2f6..bbe399010be15a873fac744fefd683ddde1af542 100644 (file)
@@ -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;
 }