Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754609AbdCJD5o (ORCPT ); Thu, 9 Mar 2017 22:57:44 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:36032 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752846AbdCJD5m (ORCPT ); Thu, 9 Mar 2017 22:57:42 -0500 Date: Thu, 9 Mar 2017 22:57:38 -0500 From: Bo Yu To: Clausen , Kroah-Hartman , Hennerich , Cameron , Knaack , Meerwald-Stadler , tsu.yubo@gmail.com Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org Subject: [PATCH] Staging: iio: return expression instead of return ret Message-ID: <20170310035738.GA1143@yubo-2> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 801 Lines: 34 The following Coccinelle script was used to detect this: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Bo YU --- drivers/staging/iio/meter/ade7754.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/iio/meter/ade7754.c b/drivers/staging/iio/meter/ade7754.c index 024463a11c47..19f8cb144768 100644 --- a/drivers/staging/iio/meter/ade7754.c +++ b/drivers/staging/iio/meter/ade7754.c @@ -349,9 +349,8 @@ 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 ade7754_spi_write_reg_16(dev, ADE7754_IRQEN, irqen); - return ret; } /* Power down the device */ -- 1.7.10.4