From: Meghana Madhyastha Date: Fri, 15 Sep 2017 07:04:30 +0000 (+0530) Subject: Staging: pi433: Merge assignment with return value X-Git-Tag: v4.15-rc1~142^2~303 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=e2614ef1b2ecb3f9f1e17762b01c2b29dbc344aa;p=linux.git Staging: pi433: Merge assignment with return value Removes the unnecessary assignment of retval preceding the return statement. Detected using the following Coccinelle script: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Meghana Madhyastha Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index c4b1b218ea38..f5b90aa759ea 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -690,9 +690,7 @@ int rf69_set_preamble_length(struct spi_device *spi, u16 preambleLength) /* transmit to chip */ retval = WRITE_REG(REG_PREAMBLE_MSB, msb); if (retval) return retval; - retval = WRITE_REG(REG_PREAMBLE_LSB, lsb); - - return retval; + return WRITE_REG(REG_PREAMBLE_LSB, lsb); } int rf69_set_sync_enable(struct spi_device *spi, enum optionOnOff optionOnOff)