From patchwork Fri May 18 18:21:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Veenstra X-Patchwork-Id: 10411791 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 75F0460353 for ; Fri, 18 May 2018 18:21:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6564E28A7F for ; Fri, 18 May 2018 18:21:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A2C328A80; Fri, 18 May 2018 18:21:46 +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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 0B76A28A81 for ; Fri, 18 May 2018 18:21:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752128AbeERSVa (ORCPT ); Fri, 18 May 2018 14:21:30 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:55777 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751588AbeERSV1 (ORCPT ); Fri, 18 May 2018 14:21:27 -0400 Received: by mail-wm0-f65.google.com with SMTP id a8-v6so15519667wmg.5; Fri, 18 May 2018 11:21:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=nybvFMTgBAL4Ty+LT/kANgw8fC/v35hOiQDPsDssNmk=; b=avevycOZ1iLB/+0V2ncQ+qPpV8mtQViJXLzTwFvIIT1zSp7LfRZUjPweXBlDQa3G9v C+bJeaLJ9xAKAB7BTVgxN7rjhObM23N7yxZai9ilpgNSMIDc9jBgQKLzmjK5eBzkRrrk my2+aOsJPVMSWI/QYwfr0hbfdaCbxABIgPfG7gDFlt0YSAe2vBpkwNlcIGfVGuTqRaya uCw3+E1/EfyUws7z8tzRQIk+AVaqBXPEvO/qDXUHx6bxaxErKoKEPYXcdBzSJMJhvEsB exaekrSETrvUceY6Zay4MeeEIatCPEuFQPsQ926CmEgQKfPwJHhAON2v+1UK9GDWGBta xu5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=nybvFMTgBAL4Ty+LT/kANgw8fC/v35hOiQDPsDssNmk=; b=I7QFrZU4rXz0zKl7KZIpQ9x/QukrlCOSXZXxtOzmPesdCQHzM3K850Lm4x6YvnLjTG iC5Wl6uFYBVUF0nzKdQWHXU69vTmgH+sWRv5knOcjJLprJ68Cb0gzyi0mjTZqWKS9aee GwfzQUlYlHDFSZSiW7D9KPS5uD2py5FykliGJ1cbsgRtNQ6y2UppoqF2vjuZ4z5nYMZ1 uC0bgXj02NPWGURPbLEZQ1KjJtuElUJ+BSOkIKkqE9IMHzApA1ZJf9K0uo4wb6C1UKUy HNSxKs10EsAQFzBqmXcLUAQNc0NZBaZnCtyc3VazIxjveSopbAYGKPoGTeS5wN90MWjM 8hFA== X-Gm-Message-State: ALKqPwcgdR3z9qPxCZk+ngeM8hsFsC0tnh6n8/aZSWc50OFOMR7PL+Cb 6jC5zDzhD46/dHcFAxfq7a8= X-Google-Smtp-Source: AB8JxZq6K3zo2OaecYPT2N6ZDY8KCiS3hOGm1T+ftcK0Eem7P9KMlZ17f3RZlVg+5quxTjEHxWHcBQ== X-Received: by 2002:a50:c20a:: with SMTP id n10-v6mr12861043edf.287.1526667685898; Fri, 18 May 2018 11:21:25 -0700 (PDT) Received: from zenbook-arch (s559434a1.adsl.online.nl. [85.148.52.161]) by smtp.gmail.com with ESMTPSA id u8-v6sm4124909edj.2.2018.05.18.11.21.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 May 2018 11:21:25 -0700 (PDT) Date: Fri, 18 May 2018 20:21:23 +0200 From: David Veenstra To: jic23@kernel.org, lars@metafoo.de, pmeerw@pmeerw.net, robh+dt@kernel.org Cc: Michael.Hennerich@analog.com, knaack.h@gmx.de, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, devicetree@vger.kernel.org Subject: [PATCH v4 02/12] staging: iio: ad2s1200: Remove unneeded initializations Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) 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 Remove 2 initializations which are unneeded, because the initialized values are never used. Signed-off-by: David Veenstra --- Changes in v4: - Introduced in this version. drivers/staging/iio/resolver/ad2s1200.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/iio/resolver/ad2s1200.c b/drivers/staging/iio/resolver/ad2s1200.c index df3b34200a89..9bdcf0c86217 100644 --- a/drivers/staging/iio/resolver/ad2s1200.c +++ b/drivers/staging/iio/resolver/ad2s1200.c @@ -47,7 +47,7 @@ static int ad2s1200_read_raw(struct iio_dev *indio_dev, long m) { struct ad2s1200_state *st = iio_priv(indio_dev); - int ret = 0; + int ret; mutex_lock(&st->lock); gpio_set_value(st->sample, 0); @@ -105,7 +105,7 @@ static int ad2s1200_probe(struct spi_device *spi) unsigned short *pins = spi->dev.platform_data; struct ad2s1200_state *st; struct iio_dev *indio_dev; - int pn, ret = 0; + int pn, ret; for (pn = 0; pn < AD2S1200_PN; pn++) { ret = devm_gpio_request_one(&spi->dev, pins[pn], GPIOF_DIR_OUT,