From 283a9e4b5624c40a69b44a7b0963996787c1afc0 Mon Sep 17 00:00:00 2001 From: Nishka Dasgupta Date: Fri, 22 Mar 2019 01:25:56 +0530 Subject: [PATCH] staging: wilc1000: Remove return variables from wilc_spi.c Remove return variables from wilc_spi.c. Issue found with Coccinelle using ret.cocci. Signed-off-by: Nishka Dasgupta Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/wilc_spi.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index 4a1be9e60d74..d8910bf9cb75 100644 --- a/drivers/staging/wilc1000/wilc_spi.c +++ b/drivers/staging/wilc1000/wilc_spi.c @@ -933,11 +933,9 @@ static int wilc_spi_read_int(struct wilc *wilc, u32 *int_status) u32 irq_flags; int k = IRG_FLAGS_OFFSET + 5; - if (spi_priv->has_thrpt_enh) { - ret = spi_internal_read(wilc, 0xe840 - WILC_SPI_REG_BASE, - int_status); - return ret; - } + if (spi_priv->has_thrpt_enh) + return spi_internal_read(wilc, 0xe840 - WILC_SPI_REG_BASE, + int_status); ret = wilc_spi_read_reg(wilc, WILC_VMM_TO_HOST_SIZE, &byte_cnt); if (!ret) { dev_err(&spi->dev, @@ -982,9 +980,8 @@ static int wilc_spi_clear_int_ext(struct wilc *wilc, u32 val) u32 tbl_ctl; if (spi_priv->has_thrpt_enh) { - ret = spi_internal_write(wilc, 0xe844 - WILC_SPI_REG_BASE, - val); - return ret; + return spi_internal_write(wilc, 0xe844 - WILC_SPI_REG_BASE, + val); } flags = val & (BIT(MAX_NUM_INT) - 1); -- 2.30.2