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:	Tue, 24 Mar 2015 17:36:24 +0100
From:	Markus Pargmann <mpa@...gutronix.de>
To:	Wolfram Sang <wsa@...-dreams.de>
Cc:	Mark Brown <broonie@...nel.org>,
	Liam Girdwood <lgirdwood@...il.com>, kernel@...gutronix.de,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] regulator: max8660: Add error message for missing
 regulator data

Hi Wolfram,

On Tue, Mar 24, 2015 at 01:38:09PM +0100, Wolfram Sang wrote:
> 
> >  	for (i = 0; i < pdata->num_subdevs; i++) {
> > -		if (!pdata->subdevs[i].platform_data)
> > +		if (!pdata->subdevs[i].platform_data) {
> > +			dev_err(dev, "No data for %d regulator\n", i);
> >  			return -EINVAL;
> > +		}
> 
> I'd rather save the string and go for -ENOENT instead. But I don't mind
> much...

I think -ENOENT doesn't describe it enough. For example if pdata is
parsed from DT, this may as well be a missing regulator node in the
devicetree.

Best Regards,

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ