diff options
author | sayli karnik <karniksayli1995@gmail.com> | 2016-09-21 23:47:55 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-22 11:54:48 +0200 |
commit | 7d359a847cf65cafa3582ee0c52f68e629fe0547 (patch) | |
tree | fbbdd369505a76a7eda84a3162aa01c0122d9497 | |
parent | efb35d12b352c0603fe21a2199ba54aa61d22a54 (diff) |
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: sayli karnik <karniksayli1995@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/ks7010/ks7010_sdio.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c index 37a4ba37bf5d..b27e9b054a94 100644 --- a/drivers/staging/ks7010/ks7010_sdio.c +++ b/drivers/staging/ks7010/ks7010_sdio.c @@ -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 rc = 0; unsigned char rw_data; int retval; if (priv->reg.powermgt == POWMGT_ACTIVE_MODE) - return rc; + return 0; if (priv->reg.operation_mode == MODE_INFRASTRUCTURE && (priv->connect_status & CONNECT_STATUS_MASK) == CONNECT_STATUS) { @@ -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) |