fdtdec: Allow using fdtdec_get_carveout() in loops
authorThierry Reding <treding@nvidia.com>
Fri, 3 Sep 2021 13:16:17 +0000 (15:16 +0200)
committerTom Warren <twarren@nvidia.com>
Wed, 13 Oct 2021 21:18:30 +0000 (14:18 -0700)
commitd5598cfa9bcab50812b2b416af91c2a37be67531
treebfb954d2df5ec7d71432579beb09ac03bc17e232
parent10cd8efe1a7eacd63907ba95bd8442bc2cdce461
fdtdec: Allow using fdtdec_get_carveout() in loops

In order make it possible to use fdtdec_get_carveout() in loops, return
FDT_ERR_NOTFOUND when the passed-in index exceeds the number of phandles
present in the given property.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
lib/fdtdec.c