Commit ca026a35 authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Greg Kroah-Hartman

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: default avatarBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c75955d1
...@@ -1012,7 +1012,6 @@ int hfa384x_cmd_initialize(hfa384x_t *hw) ...@@ -1012,7 +1012,6 @@ int hfa384x_cmd_initialize(hfa384x_t *hw)
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport) int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
{ {
int result = 0;
hfa384x_metacmd_t cmd; hfa384x_metacmd_t cmd;
cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_DISABLE) | cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_DISABLE) |
...@@ -1021,9 +1020,7 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport) ...@@ -1021,9 +1020,7 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
cmd.parm1 = 0; cmd.parm1 = 0;
cmd.parm2 = 0; cmd.parm2 = 0;
result = hfa384x_docmd_wait(hw, &cmd); return hfa384x_docmd_wait(hw, &cmd);
return result;
} }
/*---------------------------------------------------------------- /*----------------------------------------------------------------
...@@ -1048,7 +1045,6 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport) ...@@ -1048,7 +1045,6 @@ int hfa384x_cmd_disable(hfa384x_t *hw, u16 macport)
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport) int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
{ {
int result = 0;
hfa384x_metacmd_t cmd; hfa384x_metacmd_t cmd;
cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_ENABLE) | cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_ENABLE) |
...@@ -1057,9 +1053,7 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport) ...@@ -1057,9 +1053,7 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
cmd.parm1 = 0; cmd.parm1 = 0;
cmd.parm2 = 0; cmd.parm2 = 0;
result = hfa384x_docmd_wait(hw, &cmd); return hfa384x_docmd_wait(hw, &cmd);
return result;
} }
/*---------------------------------------------------------------- /*----------------------------------------------------------------
...@@ -1093,7 +1087,6 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport) ...@@ -1093,7 +1087,6 @@ int hfa384x_cmd_enable(hfa384x_t *hw, u16 macport)
----------------------------------------------------------------*/ ----------------------------------------------------------------*/
int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable) int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
{ {
int result = 0;
hfa384x_metacmd_t cmd; hfa384x_metacmd_t cmd;
cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_MONITOR) | cmd.cmd = HFA384x_CMD_CMDCODE_SET(HFA384x_CMDCODE_MONITOR) |
...@@ -1102,9 +1095,7 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable) ...@@ -1102,9 +1095,7 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
cmd.parm1 = 0; cmd.parm1 = 0;
cmd.parm2 = 0; cmd.parm2 = 0;
result = hfa384x_docmd_wait(hw, &cmd); return hfa384x_docmd_wait(hw, &cmd);
return result;
} }
/*---------------------------------------------------------------- /*----------------------------------------------------------------
...@@ -1148,7 +1139,6 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable) ...@@ -1148,7 +1139,6 @@ int hfa384x_cmd_monitor(hfa384x_t *hw, u16 enable)
int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr, int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr,
u16 highaddr, u16 codelen) u16 highaddr, u16 codelen)
{ {
int result = 0;
hfa384x_metacmd_t cmd; hfa384x_metacmd_t cmd;
pr_debug("mode=%d, lowaddr=0x%04x, highaddr=0x%04x, codelen=%d\n", 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, ...@@ -1161,9 +1151,7 @@ int hfa384x_cmd_download(hfa384x_t *hw, u16 mode, u16 lowaddr,
cmd.parm1 = highaddr; cmd.parm1 = highaddr;
cmd.parm2 = codelen; cmd.parm2 = codelen;
result = hfa384x_docmd_wait(hw, &cmd); return hfa384x_docmd_wait(hw, &cmd);
return result;
} }
/*---------------------------------------------------------------- /*----------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment