Messages in this thread | | | Date | Mon, 4 Jan 2016 09:10:28 +0100 | From | Thierry Reding <> | Subject | Re: [PATCH] pwm: Fix of_pwm_get() for consistent return values |
| |
On Sun, Nov 29, 2015 at 02:17:37PM +0100, Alban Bedel wrote: > When of_pwm_get() is called without connection ID it returns > -ENOENT when the 'pwms' property doesn't exists or is an empty entry. > However when a connection ID is given and the 'pwm-names' property > doesn't exists or doesn't contains the requested name it returns > -ENODATA or -EINVAL. > > To get a consistent return value with both code paths we must return > -ENOENT when of_property_match_string() fails.
I'm not sure I understand the need for a consistent return value here. These are all different error conditions and the only reasonable thing to do here is propagate the error code from the of_*() parsing routine that is being called.
Thierry [unhandled content-type:application/pgp-signature] | |