提交 fb364cea 编写于 作者: G Gargi Sharma 提交者: Jonathan Cameron

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: NGargi Sharma <gs051095@gmail.com>
Acked-by: NJulia Lawall <julia.lawall@lip6.fr>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 bf0adab4
...@@ -426,9 +426,7 @@ static int ade7854_set_irq(struct device *dev, bool enable) ...@@ -426,9 +426,7 @@ static int ade7854_set_irq(struct device *dev, bool enable)
else else
irqen &= ~BIT(17); irqen &= ~BIT(17);
ret = st->write_reg_32(dev, ADE7854_MASK0, irqen); return st->write_reg_32(dev, ADE7854_MASK0, irqen);
return ret;
} }
static int ade7854_initial_setup(struct iio_dev *indio_dev) static int ade7854_initial_setup(struct iio_dev *indio_dev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册