]> git.dujemihanovic.xyz Git - u-boot.git/commit
core: return FDT_ADDR_T_NONE from devfdt_get_addr_[size_]name() on errors
authorMatthias Schiffer <matthias.schiffer@ew.tq-group.com>
Wed, 27 Sep 2023 13:33:31 +0000 (15:33 +0200)
committerSimon Glass <sjg@chromium.org>
Fri, 13 Oct 2023 17:15:41 +0000 (10:15 -0700)
commite367305769d091bc8a0026d69136eb77fd055784
tree5e351b8bdffb66a00ca923c6d62b3c7b8463b80b
parente42c4d6d90c60f6b7fe01e88f458782c42cee8c9
core: return FDT_ADDR_T_NONE from devfdt_get_addr_[size_]name() on errors

Checking for the error cast to fdt_addr_t is rather awkward - IS_ERR()
can be used, but it's not really made to be used on fdt_addr_t, which
may not even be the same size as a native pointer.

Most places in U-Boot only check for FDT_ADDR_T_NONE; let's adjust the
error return to match the expectation.

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/core/fdtaddr.c
include/dm/fdtaddr.h