[U-Boot] [PATCH v2] lib: decode_timing_property should return -NOENT when proprty is not found

Ondřej Jirman megous at megous.com
Fri Apr 12 07:41:08 UTC 2019


Hello Simon,

On Thu, Apr 11, 2019 at 08:12:00PM -0600, Simon Glass wrote:
> Hi,
> 
> On Wed, 20 Feb 2019 at 18:47, Simon Glass <sjg at chromium.org> wrote:
> >
> > Hi,
> >
> > On Wed, 13 Feb 2019 at 10:50, <megous at megous.com> wrote:
> > >
> > > From: Ondrej Jirman <megous at megous.com>
> > >
> > > Length may be unitialized when fdt_getprop fails. Return ENOENT when
> > > the property can't be found.
> >
> > It should always be the error code. What situation are you seeing here?
> >
> 
> Any update on this?

See my response on v1 of the patch. You can ignore it.

thank you and regards,
  o.

> Regards,
> Simon
> 
> 
> > Regards,
> > Simon
> >
> >
> > >
> > > Signed-off-by: Ondřej Jirman <megous at megous.com>
> > > ---
> > > This was previously sent as a part of other series of patches, but
> > > it's unrelated to the rest of the patches, so I'm resending it
> > > individually.
> > >
> > > v2:
> > > - improved description
> > >
> > >  lib/fdtdec.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/lib/fdtdec.c b/lib/fdtdec.c
> > > index 18663ce6bd..3510de78e1 100644
> > > --- a/lib/fdtdec.c
> > > +++ b/lib/fdtdec.c
> > > @@ -980,7 +980,7 @@ static int decode_timing_property(const void *blob, int node, const char *name,
> > >         if (!prop) {
> > >                 debug("%s: could not find property %s\n",
> > >                       fdt_get_name(blob, node, NULL), name);
> > > -               return length;
> > > +               return -ENOENT;
> > >         }
> > >
> > >         if (length == sizeof(u32)) {
> > > --
> > > 2.20.1
> > >
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot


More information about the U-Boot mailing list