From patchwork Sat Apr 21 00:41:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Masney X-Patchwork-Id: 10353915 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B2DA36019C for ; Sat, 21 Apr 2018 00:43:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A522E288B8 for ; Sat, 21 Apr 2018 00:43:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 99CBB288BF; Sat, 21 Apr 2018 00:43:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1946C288B8 for ; Sat, 21 Apr 2018 00:43:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752644AbeDUAn3 (ORCPT ); Fri, 20 Apr 2018 20:43:29 -0400 Received: from onstation.org ([52.200.56.107]:49900 "EHLO onstation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752938AbeDUAmN (ORCPT ); Fri, 20 Apr 2018 20:42:13 -0400 Received: from xilitla.hsd1.wv.comcast.net (c-98-236-77-125.hsd1.wv.comcast.net [98.236.77.125]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: masneyb) by onstation.org (Postfix) with ESMTPSA id 1BF3B1958; Sat, 21 Apr 2018 00:42:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=onstation.org; s=default; t=1524271332; bh=tblz/jJmJDDRK6TWZTgi0P9NOH6fP0Ehk92YFIttV6Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cESNaJ81b+cX94DFiQH3gg41yNqI7ln2xCPH8ng2zCKiRbZ+8s0CbQvN2GN2J9q7J 8zcnNXrtXqwDrG1AKArD8rSLAmnNFr/TETPFvaAVBQff1ZBTjlgzZPSeiwjuj0qfOz MuRDEYV+wf46VORKH+MFgQU9CUf8SkONKNVqcVyE= From: Brian Masney To: jic23@kernel.org, linux-iio@vger.kernel.org Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, knaack.h@gmx.de, lars@metafoo.de, pmeerw@pmeerw.net, linux-kernel@vger.kernel.org, Jon.Brenner@ams.com Subject: [PATCH 06/13] staging: iio: tsl2x7x: simplify tsl2x7x_write_interrupt_config return Date: Fri, 20 Apr 2018 20:41:46 -0400 Message-Id: <20180421004153.19073-7-masneyb@onstation.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180421004153.19073-1-masneyb@onstation.org> References: <20180421004153.19073-1-masneyb@onstation.org> Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP tsl2x7x_write_interrupt_config() has an unnecessary return value check at the end of the function. This patch changes the function to just return the value from the call to tsl2x7x_invoke_change(). Signed-off-by: Brian Masney --- drivers/staging/iio/light/tsl2x7x.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c index 8d8af0cf9768..d202bc7e1f4f 100644 --- a/drivers/staging/iio/light/tsl2x7x.c +++ b/drivers/staging/iio/light/tsl2x7x.c @@ -982,18 +982,13 @@ static int tsl2x7x_write_interrupt_config(struct iio_dev *indio_dev, int val) { struct tsl2X7X_chip *chip = iio_priv(indio_dev); - int ret; if (chan->type == IIO_INTENSITY) chip->settings.als_interrupt_en = val ? true : false; else chip->settings.prox_interrupt_en = val ? true : false; - ret = tsl2x7x_invoke_change(indio_dev); - if (ret < 0) - return ret; - - return 0; + return tsl2x7x_invoke_change(indio_dev); } static int tsl2x7x_write_event_value(struct iio_dev *indio_dev,