diff options
author | Matthias Schiffer | 2023-09-27 15:33:31 +0200 |
---|---|---|
committer | Simon Glass | 2023-10-13 10:15:41 -0700 |
commit | e367305769d091bc8a0026d69136eb77fd055784 (patch) | |
tree | 5e351b8bdffb66a00ca923c6d62b3c7b8463b80b /include | |
parent | e42c4d6d90c60f6b7fe01e88f458782c42cee8c9 (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/dm/fdtaddr.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/dm/fdtaddr.h b/include/dm/fdtaddr.h index 5e8eafc203a..c577d4369ce 100644 --- a/include/dm/fdtaddr.h +++ b/include/dm/fdtaddr.h @@ -142,7 +142,7 @@ void *devfdt_get_addr_size_index_ptr(const struct udevice *dev, int index, * 'reg-names' property providing named-based identification. @name * indicates the value to search for in 'reg-names'. * - * Return: addr + * Return: Address, or FDT_ADDR_T_NONE if there is no such property */ fdt_addr_t devfdt_get_addr_name(const struct udevice *dev, const char *name); @@ -159,7 +159,7 @@ fdt_addr_t devfdt_get_addr_name(const struct udevice *dev, const char *name); * @size: Pointer to size variable - this function returns the size * specified in the 'reg' property here * - * Return: addr + * Return: Address, or FDT_ADDR_T_NONE if there is no such property */ fdt_addr_t devfdt_get_addr_size_name(const struct udevice *dev, const char *name, fdt_size_t *size); |