From patchwork Wed Aug 14 16:59:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 171325 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1120867ily; Wed, 14 Aug 2019 10:27:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyIZctVpnSpy/agrLjr3BxUTcY9jT026tynS3vACDsSLwxggQtsAlqvkDJ+I+lbEtZRCUs4 X-Received: by 2002:a17:902:bd09:: with SMTP id p9mr487028pls.96.1565803671574; Wed, 14 Aug 2019 10:27:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565803671; cv=none; d=google.com; s=arc-20160816; b=RMui+/U7qrbc9lYooe1OM0VolhkTrIaAoikKsyrCHoa9hwpJ5wWYesTa5X61d2n4dD 8AquKoRevxiah0Tec/r06N4aie2nXZ2Ec78iW2NUfrujm5pulRtoPblEkO96DTtj1z7r xZrbVjXQho6n4WEPvwPYWBKH0OUq80v7vU0jcEFXrBtdeGm2cOpVMY7T7sai9whn7WGa ssW1426PZa5TAtMZnA7w1Wh9vtxnCvWej69ryFOHqrBn0hxxbcqqIjYfAnFl3uxapf/s EfUS7BeovR1woQZLtzRYE5hY7bVvN+jYincuYW2Nm/ge7q9cDWuJt+K+dy/7pCavPTzr oF5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=K802Mi5T/qQTeqBMoyqBGfnb4ajVAWdN/RtBR26xYk8=; b=a5/FDxzuSW1Kl3yPm2NUThjuqWUZZbE08SLzzyMHb3YiF90ypm86YICxLEq+WTSGYJ DyOTM6CraPzRanTzPNe9eCvEMMkgfcKEFk9zF9hu02mDVmWFnVAelRhJhi/Yz/lr9gm4 ITnYvWGWJDD+fps483QZElQCig0Oncrfr985z9LaM2o0+nMLWe6JhTR/4Pjf3H5QuluP V5By7/AjLIuHVwfaATrMVDigwPiZrKwm88Hra+oEGMNQ+AQey/w1iqKGc5hAi55TPB1u C7K8Ggm2BSKoyh5G4Ea8WM0es2OlOfUd2jONmiuE53C87n40OzVZpuobbyrjuwSXnK4G LLdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VHDxhv+g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x20si233478pjn.49.2019.08.14.10.27.51; Wed, 14 Aug 2019 10:27:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VHDxhv+g; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729016AbfHNR1u (ORCPT + 28 others); Wed, 14 Aug 2019 13:27:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:51804 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728864AbfHNRDM (ORCPT ); Wed, 14 Aug 2019 13:03:12 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5A9582084D; Wed, 14 Aug 2019 17:03:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565802191; bh=kkUe3JrHtt33qgnokR/O4h/ujXrDTTyDNjLo5bGc2XQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VHDxhv+gaTJWeD0fdHAO4t2e4F7N5nFEdZZpcLhsgIz+P6SqcfVwPjINh4RcY187s 4+jv7oZE7fc2uYqQf2HssUbBAG4MoDuqH4DP7cSokLJilSdSbYzUL8BAFFVdJidhiO 94bR62hZoj4OWTFVrX7BaAWGoUa2/BzTui/o56wE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Wolfram Sang , Jonathan Cameron Subject: [PATCH 5.2 005/144] iio: adc: gyroadc: fix uninitialized return code Date: Wed, 14 Aug 2019 18:59:21 +0200 Message-Id: <20190814165759.707144215@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190814165759.466811854@linuxfoundation.org> References: <20190814165759.466811854@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann commit 90c6260c1905a68fb596844087f2223bd4657fee upstream. gcc-9 complains about a blatant uninitialized variable use that all earlier compiler versions missed: drivers/iio/adc/rcar-gyroadc.c:510:5: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] Return -EINVAL instead here and a few lines above it where we accidentally return 0 on failure. Cc: stable@vger.kernel.org Fixes: 059c53b32329 ("iio: adc: Add Renesas GyroADC driver") Signed-off-by: Arnd Bergmann Reviewed-by: Wolfram Sang Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/adc/rcar-gyroadc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/iio/adc/rcar-gyroadc.c +++ b/drivers/iio/adc/rcar-gyroadc.c @@ -382,7 +382,7 @@ static int rcar_gyroadc_parse_subdevs(st dev_err(dev, "Only %i channels supported with %pOFn, but reg = <%i>.\n", num_channels, child, reg); - return ret; + return -EINVAL; } } @@ -391,7 +391,7 @@ static int rcar_gyroadc_parse_subdevs(st dev_err(dev, "Channel %i uses different ADC mode than the rest.\n", reg); - return ret; + return -EINVAL; } /* Channel is valid, grab the regulator. */