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]
Message-ID: <YrrNxEIMuYLpzCd1@smile.fi.intel.com>
Date:   Tue, 28 Jun 2022 12:45:40 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Lee Jones <lee.jones@...aro.org>
Cc:     linux-kernel@...r.kernel.org, Andy Shevchenko <andy@...nel.org>
Subject: Re: [PATCH v1 01/11] mfd: intel_soc_pmic_bxtwc: Don't shadow error
 codes in show()/store()

On Mon, Jun 27, 2022 at 10:05:07AM +0100, Lee Jones wrote:
> On Thu, 16 Jun 2022, Andy Shevchenko wrote:

...

> > +	ret = kstrtoul(buf, 0, &bxtwc_reg_addr);
> > +	if (ret) {
> >  		dev_err(dev, "Invalid register address\n");
> 
> Is that really what failure means, on every failure?
> 
>   "Returns 0 on success, -ERANGE on overflow and -EINVAL on parsing
>    error."

As far as I can see in either case the address is invalid.
Basically we may drop this confusing error message here, if
this what you prefer.

> > -		return -EINVAL;
> > +		return ret;
> >  	}

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ