diff options
author | Amitoj Kaur Chawla <amitoj1606@gmail.com> | 2015-10-26 17:57:20 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-27 08:00:47 (GMT) |
commit | f79dc1679aff988297e020759c413f014a770aa9 (patch) | |
tree | cd1a710968ddee8b280afeb6462a249187d837d6 | |
parent | d743db9f053f8d95f0cbd2470aea39d225ac4f9e (diff) | |
download | linux-f79dc1679aff988297e020759c413f014a770aa9.tar.xz |
staging: rtl8188eu: Remove unnecessary variables
Remove unnecessary variable that can be replaced with a single line
of code.
The semantic patch used to find this is:
// <smpl>
@@
expression ret;
@@
- if (ret) return ret;
- return 0;
+ return ret;
@@
local idexpression ret;
expression e;
@@
- ret = e;
- return ret;
+ return e;
@@
type T;
identifier i;
expression E;
@@
- T i = E;
... when != i
@@
type T;
identifier i;
@@
- T i;
... when != i
// </smpl>
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtl8188eu/hal/fw.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c index a71c542..23aa6d3 100644 --- a/drivers/staging/rtl8188eu/hal/fw.c +++ b/drivers/staging/rtl8188eu/hal/fw.c @@ -190,7 +190,6 @@ int rtl88eu_download_fw(struct adapter *adapt) struct rtl92c_firmware_header *pfwheader = NULL; u8 *pfwdata; u32 fwsize; - int err; if (request_firmware(&fw, fw_name, device)) { dev_err(device, "Firmware %s not available\n", fw_name); @@ -229,7 +228,5 @@ int rtl88eu_download_fw(struct adapter *adapt) _rtl88e_write_fw(adapt, pfwdata, fwsize); _rtl88e_enable_fw_download(adapt, false); - err = _rtl88e_fw_free_to_go(adapt); - - return err; + return _rtl88e_fw_free_to_go(adapt); } |