staging: wilc1000: Merge assignment with return
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>
This commit is contained in:
parent
51319662d6
commit
d37843d1a9
|
@ -3279,7 +3279,6 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type,
|
||||||
int wilc_hif_set_cfg(struct wilc_vif *vif,
|
int wilc_hif_set_cfg(struct wilc_vif *vif,
|
||||||
struct cfg_param_attr *cfg_param)
|
struct cfg_param_attr *cfg_param)
|
||||||
{
|
{
|
||||||
int result = 0;
|
|
||||||
struct host_if_msg msg;
|
struct host_if_msg msg;
|
||||||
struct host_if_drv *hif_drv = vif->hif_drv;
|
struct host_if_drv *hif_drv = vif->hif_drv;
|
||||||
|
|
||||||
|
@ -3293,9 +3292,7 @@ int wilc_hif_set_cfg(struct wilc_vif *vif,
|
||||||
msg.body.cfg_info = *cfg_param;
|
msg.body.cfg_info = *cfg_param;
|
||||||
msg.vif = vif;
|
msg.vif = vif;
|
||||||
|
|
||||||
result = wilc_enqueue_cmd(&msg);
|
return wilc_enqueue_cmd(&msg);
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void GetPeriodicRSSI(unsigned long arg)
|
static void GetPeriodicRSSI(unsigned long arg)
|
||||||
|
|
|
@ -410,8 +410,7 @@ static int spi_cmd_complete(struct wilc *wilc, u8 cmd, u32 adr, u8 *b, u32 sz,
|
||||||
if (len2 > ARRAY_SIZE(wb)) {
|
if (len2 > ARRAY_SIZE(wb)) {
|
||||||
dev_err(&spi->dev, "spi buffer size too small (%d) (%zu)\n",
|
dev_err(&spi->dev, "spi buffer size too small (%d) (%zu)\n",
|
||||||
len2, ARRAY_SIZE(wb));
|
len2, ARRAY_SIZE(wb));
|
||||||
result = N_FAIL;
|
return N_FAIL;
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
/* zero spi write buffers. */
|
/* zero spi write buffers. */
|
||||||
for (wix = len; wix < len2; wix++)
|
for (wix = len; wix < len2; wix++)
|
||||||
|
|
|
@ -1001,8 +1001,7 @@ int wilc_wlan_start(struct wilc *wilc)
|
||||||
ret = wilc->hif_func->hif_write_reg(wilc, WILC_VMM_CORE_CFG, reg);
|
ret = wilc->hif_func->hif_write_reg(wilc, WILC_VMM_CORE_CFG, reg);
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
release_bus(wilc, RELEASE_ONLY);
|
release_bus(wilc, RELEASE_ONLY);
|
||||||
ret = -EIO;
|
return -EIO;
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
reg = 0;
|
reg = 0;
|
||||||
if (wilc->io_type == HIF_SDIO && wilc->dev_irq_num)
|
if (wilc->io_type == HIF_SDIO && wilc->dev_irq_num)
|
||||||
|
|
Loading…
Reference in New Issue