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] [day] [month] [year] [list]
Date:   Fri, 10 Mar 2023 08:34:28 -0800
From:   Guenter Roeck <linux@...ck-us.net>
To:     Marcus Folkesson <marcus.folkesson@...il.com>
Cc:     Jean Delvare <jdelvare@...e.com>, linux-hwmon@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] hwmon: (ina3221) return prober error code

On Fri, Mar 10, 2023 at 08:50:35AM +0100, Marcus Folkesson wrote:
> ret is set to 0 which do not indicate an error.
> Return -EINVAL instead.
> 
> Signed-off-by: Marcus Folkesson <marcus.folkesson@...il.com>

Applied.

Thanks,
Guenter

> ---
>  drivers/hwmon/ina3221.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/ina3221.c b/drivers/hwmon/ina3221.c
> index e06186986444..f3a4c5633b1e 100644
> --- a/drivers/hwmon/ina3221.c
> +++ b/drivers/hwmon/ina3221.c
> @@ -772,7 +772,7 @@ static int ina3221_probe_child_from_dt(struct device *dev,
>  		return ret;
>  	} else if (val > INA3221_CHANNEL3) {
>  		dev_err(dev, "invalid reg %d of %pOFn\n", val, child);
> -		return ret;
> +		return -EINVAL;
>  	}
>  
>  	input = &ina->inputs[val];

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ