Staging: iio: return expression instead of return ret
authorBo Yu <tsu.yubo@gmail.com>
Fri, 10 Mar 2017 03:57:38 +0000 (22:57 -0500)
committerJonathan Cameron <jic23@kernel.org>
Sat, 11 Mar 2017 18:24:38 +0000 (18:24 +0000)
The following Coccinelle script was used to detect this:

@@
local idexpression ret;
expression e;
@@

-ret =
+return
       e;
-return ret;

Signed-off-by: Bo YU <tsu.yubo@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/meter/ade7754.c

index 024463a11c47b6c19d6d9da7c68994e12a8ad9df..8f03fee3c6ea0c7e39aedbfa4c98d797793c1e70 100644 (file)
@@ -349,9 +349,7 @@ static int ade7754_set_irq(struct device *dev, bool enable)
        else
                irqen &= ~BIT(14);
 
-       ret = ade7754_spi_write_reg_16(dev, ADE7754_IRQEN, irqen);
-
-       return ret;
+       return ade7754_spi_write_reg_16(dev, ADE7754_IRQEN, irqen);
 }
 
 /* Power down the device */