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>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
static
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));
if ((priv->connect_status & CONNECT_STATUS_MASK) == CONNECT_STATUS) {
} else {
priv->dev_state = DEVICE_STATE_READY;
}
- return rc;
+ return 0;
}
static
{
unsigned char *bp;
int bsize, offset;
- int rc = 0;
DPRINTK(3, "\n");
memset(ap, 0, sizeof(struct local_ap_t));
bp += (*(bp + 1) + 2); /* pointer update */
}
- return rc;
+ return 0;
}
static
int hostif_init(struct ks_wlan_private *priv)
{
- int rc = 0;
int i;
DPRINTK(3, "\n");
tasklet_init(&priv->sme_task, hostif_sme_task, (unsigned long)priv);
- return rc;
+ return 0;
}
void hostif_exit(struct ks_wlan_private *priv)