staging: wilc1000: wilc_spi.c: Modify return statement.
PATCH v2 1/1 staging: wilc1000: wilc_spi.c: Modify return statement.
Challenge suggested by coccinelle.
Remove return variable and directly return the value Issue found using ret.cocci
Signed-off-by Sanjana Sanikommu <[email protected]>
---
Changes in v2:
Adjust space for last argument in return statement.
drivers/staging/wilc1000/wilc_spi.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/staging/wilc1000/wilc_spi.c +4 -6
@@ -934,9 +934,8 @@ static int wilc_spi_read_int(struct wilc *wilc, u32 *int_status)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; +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) {
@@ -982,9 +981,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 );
Signature · 1 line
2.17.1