mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 12:53:04 -04:00
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>
This commit is contained in:
committed by
Jonathan Cameron
parent
bf0adab4cd
commit
fb364cea3d
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user