Instead of storing the return value into a variable and then returning it, we
can club the two into a single return statement. This change was made using
the following semantic patch by Coccinelle:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
int wilc_hif_set_cfg(struct wilc_vif *vif,
struct cfg_param_attr *cfg_param)
{
- int result = 0;
struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
msg.body.cfg_info = *cfg_param;
msg.vif = vif;
- result = wilc_enqueue_cmd(&msg);
-
- return result;
+ return wilc_enqueue_cmd(&msg);
}
static void GetPeriodicRSSI(unsigned long arg)
if (len2 > ARRAY_SIZE(wb)) {
dev_err(&spi->dev, "spi buffer size too small (%d) (%zu)\n",
len2, ARRAY_SIZE(wb));
- result = N_FAIL;
- return result;
+ return N_FAIL;
}
/* zero spi write buffers. */
for (wix = len; wix < len2; wix++)
ret = wilc->hif_func->hif_write_reg(wilc, WILC_VMM_CORE_CFG, reg);
if (!ret) {
release_bus(wilc, RELEASE_ONLY);
- ret = -EIO;
- return ret;
+ return -EIO;
}
reg = 0;
if (wilc->io_type == HIF_SDIO && wilc->dev_irq_num)