diff options
author | Gargi Sharma | 2017-02-17 18:17:21 +0100 |
---|---|---|
committer | Jonathan Cameron | 2017-02-18 19:58:08 +0100 |
commit | fb364cea3d245fff5cb4c953c8c9a4b1efcbe4c6 (patch) | |
tree | 94950bad1b0b6aec42fa17757054797596fe157c /drivers/staging | |
parent | staging: iio: adis16240_core: Replace symbolic permission with octal permission (diff) | |
download | kernel-qcow2-linux-fb364cea3d245fff5cb4c953c8c9a4b1efcbe4c6.tar.gz kernel-qcow2-linux-fb364cea3d245fff5cb4c953c8c9a4b1efcbe4c6.tar.xz kernel-qcow2-linux-fb364cea3d245fff5cb4c953c8c9a4b1efcbe4c6.zip |
staging: iio: compress return logic
Simplify function returns by merging assignment and return.
Found with Coccinelle.
Semantic patch:
@@
local idexpression ret;
expression e;
@@
-ret =
+return
e;
-return ret;
Signed-off-by: Gargi Sharma <gs051095@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/iio/meter/ade7854.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/iio/meter/ade7854.c b/drivers/staging/iio/meter/ade7854.c index e8007f0c5186..c6cffc11b0ba 100644 --- a/drivers/staging/iio/meter/ade7854.c +++ b/drivers/staging/iio/meter/ade7854.c @@ -426,9 +426,7 @@ static int ade7854_set_irq(struct device *dev, bool enable) else irqen &= ~BIT(17); - ret = st->write_reg_32(dev, ADE7854_MASK0, irqen); - - return ret; + return st->write_reg_32(dev, ADE7854_MASK0, irqen); } static int ade7854_initial_setup(struct iio_dev *indio_dev) |