Commit 0525a57b 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>
Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 197cc86e
...@@ -92,8 +92,6 @@ static void ks_wlan_hw_wakeup_task(struct work_struct *work) ...@@ -92,8 +92,6 @@ static void ks_wlan_hw_wakeup_task(struct work_struct *work)
static static
int ks_wlan_do_power_save(struct ks_wlan_private *priv) int ks_wlan_do_power_save(struct ks_wlan_private *priv)
{ {
int rc = 0;
DPRINTK(4, "psstatus.status=%d\n", atomic_read(&priv->psstatus.status)); DPRINTK(4, "psstatus.status=%d\n", atomic_read(&priv->psstatus.status));
if ((priv->connect_status & CONNECT_STATUS_MASK) == CONNECT_STATUS) { if ((priv->connect_status & CONNECT_STATUS_MASK) == CONNECT_STATUS) {
...@@ -101,7 +99,7 @@ int ks_wlan_do_power_save(struct ks_wlan_private *priv) ...@@ -101,7 +99,7 @@ int ks_wlan_do_power_save(struct ks_wlan_private *priv)
} else { } else {
priv->dev_state = DEVICE_STATE_READY; priv->dev_state = DEVICE_STATE_READY;
} }
return rc; return 0;
} }
static static
...@@ -213,7 +211,6 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, ...@@ -213,7 +211,6 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info,
{ {
unsigned char *bp; unsigned char *bp;
int bsize, offset; int bsize, offset;
int rc = 0;
DPRINTK(3, "\n"); DPRINTK(3, "\n");
memset(ap, 0, sizeof(struct local_ap_t)); memset(ap, 0, sizeof(struct local_ap_t));
...@@ -311,7 +308,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info, ...@@ -311,7 +308,7 @@ int get_ap_information(struct ks_wlan_private *priv, struct ap_info_t *ap_info,
bp += (*(bp + 1) + 2); /* pointer update */ bp += (*(bp + 1) + 2); /* pointer update */
} }
return rc; return 0;
} }
static static
...@@ -2681,7 +2678,6 @@ void hostif_sme_enqueue(struct ks_wlan_private *priv, unsigned short event) ...@@ -2681,7 +2678,6 @@ void hostif_sme_enqueue(struct ks_wlan_private *priv, unsigned short event)
int hostif_init(struct ks_wlan_private *priv) int hostif_init(struct ks_wlan_private *priv)
{ {
int rc = 0;
int i; int i;
DPRINTK(3, "\n"); DPRINTK(3, "\n");
...@@ -2731,7 +2727,7 @@ int hostif_init(struct ks_wlan_private *priv) ...@@ -2731,7 +2727,7 @@ int hostif_init(struct ks_wlan_private *priv)
tasklet_init(&priv->sme_task, hostif_sme_task, (unsigned long)priv); tasklet_init(&priv->sme_task, hostif_sme_task, (unsigned long)priv);
return rc; return 0;
} }
void hostif_exit(struct ks_wlan_private *priv) void hostif_exit(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