lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 15 Dec 2022 16:48:08 +0000
From:   Mark Brown <broonie@...nel.org>
To:     Arnd Bergmann <arnd@...nel.org>
Cc:     Tony Lindgren <tony@...mide.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Jerome Neanne <jneanne@...libre.com>,
        Arnd Bergmann <arnd@...db.de>, Axel Lin <axel.lin@...ics.com>,
        Yang Li <yang.lee@...ux.alibaba.com>,
        Yang Yingliang <yangyingliang@...wei.com>,
        linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regulator: tps65219: fix Wextra warning

On Thu, Dec 15, 2022 at 05:41:28PM +0100, Arnd Bergmann wrote:

> -		tps65219_get_rdev_by_name(irq_type->regulator_name, rdevtbl, rdev);
> -		if (rdev < 0) {
> +		error = tps65219_get_rdev_by_name(irq_type->regulator_name, rdevtbl, rdev);
> +		if (error) {
>  			dev_err(tps->dev, "Failed to get rdev for %s\n",
>  				irq_type->regulator_name);
> -			return -EINVAL;
> +			return error;

This will shut up the warning but is leaving the use of the
uninitialised rdev (which I'm kind of disappointed the static checkers
didn't pick up on).  rdev needs to be passed by reference into the
function, or set from the return value.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ