From: Bhumika Goyal Date: Mon, 8 Feb 2016 19:58:10 +0000 (+0530) Subject: Staging:wlan-ng:Merged two lines into one X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ca026a3504c2033821b672a09b26d467ae017eb2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Staging:wlan-ng:Merged two lines into one The last two lines of these functions are compressed into one. Also removed the variable ret as it is now not used. Found using coccinelle: @@ expression e, ret; @@ -ret = +return e; -return ret; Signed-off-by: Bhumika Goyal Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wlan-ng/hfa384x_usb.c b/drivers/staging/wlan-ng/hfa384x_usb.c index 682de77e7561..fda8a95cb721 100644 --- a/drivers/staging/wlan-ng/hfa384x_usb.c +++ b/drivers/staging/wlan-ng/hfa384x_usb.c @@ -1012,7 +1012,6 @@ int hfa384x_cmd_initialize(hfa384x_t *hw) ----------------------------------------------------------------*/ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport) { - int result = 0; hfa384x_metacmd_t cmd; cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_DISABLE) | @@ -1021,9 +1020,7 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport) cmd.parm1 = 0; cmd.parm2 = 0; - result = hfa384x_docmd_wait(hw, &cmd); - - return result; + return hfa384x_docmd_wait(hw, &cmd); } /*---------------------------------------------------------------- @@ -1048,7 +1045,6 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport) ----------------------------------------------------------------*/ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport) { - int result = 0; hfa384x_metacmd_t cmd; cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_ENABLE) | @@ -1057,9 +1053,7 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport) cmd.parm1 = 0; cmd.parm2 = 0; - result = hfa384x_docmd_wait(hw, &cmd); - - return result; + return hfa384x_docmd_wait(hw, &cmd); } /*---------------------------------------------------------------- @@ -1093,7 +1087,6 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport) ----------------------------------------------------------------*/ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable) { - int result = 0; hfa384x_metacmd_t cmd; cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_MONITOR) | @@ -1102,9 +1095,7 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable) cmd.parm1 = 0; cmd.parm2 = 0; - result = hfa384x_docmd_wait(hw, &cmd); - - return result; + return hfa384x_docmd_wait(hw, &cmd); } /*---------------------------------------------------------------- @@ -1148,7 +1139,6 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable) int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr, u16 highaddr, u16 codelen) { - int result = 0; hfa384x_metacmd_t cmd; pr_debug("mode=%d, lowaddr=0x%04x, highaddr=0x%04x, codelen=%d\n", @@ -1161,9 +1151,7 @@ int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr, cmd.parm1 = highaddr; cmd.parm2 = codelen; - result = hfa384x_docmd_wait(hw, &cmd); - - return result; + return hfa384x_docmd_wait(hw, &cmd); } /*----------------------------------------------------------------