Commit e2614ef1 authored by Meghana Madhyastha's avatar Meghana Madhyastha Committed by Greg Kroah-Hartman

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: default avatarMeghana Madhyastha <meghana.madhyastha@gmail.com>
Acked-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0d27c94a
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment