Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1087500ybl; Wed, 14 Aug 2019 10:29:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxZ4O5wUSOENYzULllp/mut8Oc7BcnyKhV6a40dF7n+7JRw9t1MCYByAIwzlEuPGTW/de71 X-Received: by 2002:aa7:9903:: with SMTP id z3mr1033998pff.200.1565803790333; Wed, 14 Aug 2019 10:29:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565803790; cv=none; d=google.com; s=arc-20160816; b=VLBC2f3bE9b3uxk/YA5Abk0svcmOvho8giGgqSlP2WMiAgeLilbIWCh78//5M1NPyD Ab5isBPBQY/+EvJICFCHV+nU/BiaS8jAdwanTYwWVe9XvN2lZ5dDW5vMuOp6VtKEjXb1 n7MLCziaxg1V5QSwMCsZMVP/LhZo7XJ1byQoYeEECkN19stCNhucpObVQCvqNvLiPmHX FIi5wWoCpR4FCsS7LUZVX1cka7PYGUCS0h1BnLUcvw5aCaPHwAvN3kgXq3551Lfz6Z4v uNO5sIFb/n0B18yUufV6IIeijLW4954Oq2b2P5ekQqbzWLL2Py0wIfAJoToppUNel/JY vsLg== 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 h186si208936pge.110.2019.08.14.10.29.34; Wed, 14 Aug 2019 10:29:50 -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 S1728887AbfHNR1t (ORCPT + 99 others); Wed, 14 Aug 2019 13:27:49 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. */