]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: wilc1000: Remove return variables from wilc_spi.c
authorNishka Dasgupta <nishka.dasgupta@yahoo.com>
Thu, 21 Mar 2019 19:55:56 +0000 (01:25 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 Mar 2019 14:16:29 +0000 (15:16 +0100)
Remove return variables from wilc_spi.c. Issue found with Coccinelle
using ret.cocci.

Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_spi.c

index 4a1be9e60d749803815a19df01cf97022954fd6e..d8910bf9cb753f0280a148cc88ec317dc7e69ceb 100644 (file)
@@ -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);