Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2095134ybi; Thu, 4 Jul 2019 05:10:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqxzeib8B+Ztn3O6tI3cUTAKrLfiG5fy2hygMiv2A8OVd15eLpw9PPl+x+kM4ceEYUuwzy41 X-Received: by 2002:a65:51c6:: with SMTP id i6mr42885399pgq.275.1562242205038; Thu, 04 Jul 2019 05:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562242205; cv=none; d=google.com; s=arc-20160816; b=PLymcMQIDoiLhoHnTcxTUIm7iHtD47gyxd3Lb3YHOXPzC1Td316YYvYMpEih9KTVmp e8Lww6TJFi92GUBf46d3vcgdTJDcpFh7coDRGq4Wuyk6OYu9CaTIJtGCyoozITlGuCqh YpAcxGRQD39Vk0lgNDBjr/CjEfEzlKp5bxdsQjhRJJ8wIDOEWL6tSf2shiHBv/pxW4C9 Tzg4DAUjh6l3cxxr79fDP35U76jfDtgnpIL/U068jX8U1xZ+Yq4Dd1gDck+Ceebgr/+6 Mn2wxIpje3Vu9CaUpw0UEvi6swhq27tZBLFQKBJM4TI0M5hlZjO76oUjKewjj1p/bZR6 9qhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=pyy8sSVZ/zw8AT54r67sAnk1Hy4MglVXa2lR9/gA1Dg=; b=bJ+NYipWMyEMq/k8I6JUgALjSJ1yUdVz06VMEXwtODVFjBLC5AIMK/qAA6t9NbXT2x YJP29alY6MISRFmHs2yWimkFP6xvmG1i8hRDbNscZwUAv/IsgMu/WV0l6aFARtiDJd/J NyJKtGJ1YETcTvE/HpRIGOAwQzsd33s76TletYdYEAEqiYLbv3hPP8ne4ZZmo7QbtrI3 9Awf+rTD/Qnnjyr++Fpztb3XWk9d3ZpEKdK0A2rWIHFDSd9k3zTI3aDXZfjlxAhgoKnY Z5zkLraCIrmor6L77DwxCV7FOUGAr7SwYkgu+nmpWxWX86EDB8Qw61Rr6Lza6nrsOh3J i55Q== ARC-Authentication-Results: i=1; mx.google.com; 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 gb4si5100884plb.429.2019.07.04.05.09.49; Thu, 04 Jul 2019 05:10:05 -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; 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 S1727723AbfGDMH7 (ORCPT + 99 others); Thu, 4 Jul 2019 08:07:59 -0400 Received: from sauhun.de ([88.99.104.3]:36230 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727658AbfGDMH7 (ORCPT ); Thu, 4 Jul 2019 08:07:59 -0400 Received: from localhost (p2E56AA43.dip0.t-ipconnect.de [46.86.170.67]) by pokefinder.org (Postfix) with ESMTPSA id C8ED32C290E; Thu, 4 Jul 2019 14:07:56 +0200 (CEST) Date: Thu, 4 Jul 2019 14:07:56 +0200 From: Wolfram Sang To: Arnd Bergmann Cc: Marek Vasut , Jonathan Cameron , stable@vger.kernel.org, Marek Vasut , Geert Uytterhoeven , Simon Horman , linux-renesas-soc@vger.kernel.org, Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Rob Herring , Kuninori Morimoto , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] iio: adc: gyroadc: fix uninitialized return code Message-ID: <20190704120756.GA1582@kunai> References: <20190704113800.3299636-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vtzGhvizbBRQ85DL" Content-Disposition: inline In-Reply-To: <20190704113800.3299636-1-arnd@arndb.de> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 04, 2019 at 01:37:47PM +0200, Arnd Bergmann wrote: > gcc-9 complains about a blatant uninitialized variable use that > all earlier compiler versions missed: >=20 > drivers/iio/adc/rcar-gyroadc.c:510:5: warning: 'ret' may be used uninitia= lized in this function [-Wmaybe-uninitialized] >=20 > Return -EINVAL instead here. >=20 > Cc: stable@vger.kernel.org > Fixes: 059c53b32329 ("iio: adc: Add Renesas GyroADC driver") > Signed-off-by: Arnd Bergmann This is correct but missing that the above 'return ret' is broken, too. ret is initialized but 0 in that case. And maybe we can use something else than -EINVAL for this case? I am on the go right now, I will look for a suggestion later. --vtzGhvizbBRQ85DL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl0d7BgACgkQFA3kzBSg KbY6MA/+MZnJI+HpdsYYnacUJPbBKtq73+/XNntSU3b6UPF1W0sqz6J4Dq0oWfJt XCvyZIvynLXmakJvKtOo6DVmfw4UUkouolEknvrmC68Ng+G1ONH5ktqPR7zr0gAF P2/Lz8lCjI4cnYt4A7Km3s52DzJSyG33H7IsdEgw6nunrOw1WlB8jyy+vTOGofW+ soPn6WfInVRq/2YTAbthPYPZEn45k2F/T1I6psP6+59Zp3gW8Dtk/FCisvukxOa1 2+X945XtosWVF5hfjgXzH/s9VyrjMVXAVDDc97lIUbnasCgmLMVEEVHf9wQFY6B9 CVNVWd99XRordyDACvCSSdbjLmajDfBDKk2D1atOEqMeVfW2dcBa3SrXQGJodBgj M+6A2W3L4WvwllX9w4vZZaGVlaSmSUYbM5Cd1x5tzbUGhxIzvT0Q91gNT/Gy3YND PqFUfQwh8gHnMIouYEHezAQJvjOqsCs4ie6mg587k3bJAcD8u+YJ7/Ah/Kvdevb2 JuuzHLJx+V5qwEOkoyvxzOwpyg6kHBmBUAkCtPT3BGz4fj+TvNDL1Q7U7l9JdQhB qNgskuZMpZCYbjeCGV3eA4pGHfi8NGeJqbgz6iVG9FTnPfEQXEH3IVmvjqQF3QoW VZWoK5vF+gpt3ui7FwIW1HZahQD5wjaPyCNrjqgu2TCRvotoJhg= =WY5/ -----END PGP SIGNATURE----- --vtzGhvizbBRQ85DL--