Commit 7d359a84 authored by sayli karnik's avatar sayli karnik Committed by Greg Kroah-Hartman

staging: ks7010: Remove unnecessary variable used to store return value

This patch removes an unnecessary variable used to store return values
in order to reduce memory usage.
Done using coccinelle:
@@
type T;
constant C;
identifier ret;
@@
- T ret = C;
... when != ret
return
- ret
+ C
;
Signed-off-by: default avatarsayli karnik <karniksayli1995@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent efb35d12
...@@ -171,12 +171,11 @@ void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv) ...@@ -171,12 +171,11 @@ void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv)
int _ks_wlan_hw_power_save(struct ks_wlan_private *priv) int _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
{ {
int rc = 0;
unsigned char rw_data; unsigned char rw_data;
int retval; int retval;
if (priv->reg.powermgt == POWMGT_ACTIVE_MODE) if (priv->reg.powermgt == POWMGT_ACTIVE_MODE)
return rc; return 0;
if (priv->reg.operation_mode == MODE_INFRASTRUCTURE && if (priv->reg.operation_mode == MODE_INFRASTRUCTURE &&
(priv->connect_status & CONNECT_STATUS_MASK) == CONNECT_STATUS) { (priv->connect_status & CONNECT_STATUS_MASK) == CONNECT_STATUS) {
...@@ -244,7 +243,7 @@ int _ks_wlan_hw_power_save(struct ks_wlan_private *priv) ...@@ -244,7 +243,7 @@ int _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
} }
} }
return rc; return 0;
} }
int ks_wlan_hw_power_save(struct ks_wlan_private *priv) int ks_wlan_hw_power_save(struct ks_wlan_private *priv)
......
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