Re: [PATCH 2/2] reset: add support for fwnode
From: Clément Léger
Date: Thu Mar 24 2022 - 05:20:56 EST
Le Wed, 23 Mar 2022 17:21:21 +0100,
Clément Léger <clement.leger@xxxxxxxxxxx> a écrit :
> > > if (id) {
> > > - index = of_property_match_string(node,
> > > - "reset-names", id);
> > > + index = fwnode_property_match_string(fwnode, "reset-names", id);
> > > if (index == -EILSEQ)
> > > return ERR_PTR(index);
> >
> > I don't think this is good enough any more. At least -ENOMEM is added
> > as a possible error return code by this change.
>
> Yes indeed, errors are clearly not correctly handled anymore. At least
> -EILSEQ won't be triggered.
> >
By the way, even after looking at this more carefully, I'm not sure to
understand why there is a special handling for -EILSEQ ? From what I
understand, EILSEQ is returned in case the device tree is malformed
(string longer than returned property length) but why is it handled
differently in this case ?
Thanks,
--
Clément Léger,
Embedded Linux and Kernel engineer at Bootlin
https://bootlin.com