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
| ||
|
Date: Sat, 14 May 2016 00:16:35 +0300 From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com> To: Andrew Lunn <andrew@...n.ch> Cc: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>, grant.likely@...aro.org, robh+dt@...nel.org, devicetree@...r.kernel.org, f.fainelli@...il.com, netdev@...r.kernel.org, frowand.list@...il.com, pawel.moll@....com, mark.rutland@....com, ijc+devicetree@...lion.org.uk, galak@...eaurora.org, linux-kernel@...r.kernel.org, Linus Walleij <linus.walleij@...aro.org> Subject: Re: [PATCH RFT 1/2] phylib: add device reset GPIO support Hello. On 05/13/2016 07:06 AM, Andrew Lunn wrote: >>>> + gpiod = fwnode_get_named_gpiod(&child->fwnode, "reset-gpios"); >>>> + /* Deassert the reset signal */ >>>> + if (!IS_ERR(gpiod)) >>>> + gpiod_direction_output(gpiod, 0); >>> >>> This is wrong I think. You must only ignore -ENODEV, all other error >> >> At least -ENOSYS should also be ignored (it's returned when >> gpiolib is not configured), right? When does -ENODEV gets returned >> (it's not easy to follow)? >> >>> codes should be passed to the caller. >> >> The caller doesn't care anyway... > > It should do. Tell that to Florian. So far, everybody has been happy with of_mdiobus_register(). Until I had to touch this code. :-) > What if fwnode_get_named_gpiod() returns -EPROBE_DEFER > because the GPIO driver has not been loaded yet? Bad luck. :-) Seriously, I'll see what I can do but it's not a trivial case. > Andrew MBR, Sergei
Powered by blists - more mailing lists