of: reserved_mem: use -ENODEV instead of -ENOENT

When given reserved memory region doesn't really support given node,
return -ENODEV instead of -ENOENT. Then fix __reserved_mem_init_node()
function to properly propagate error code different from -ENODEV instead
of silently ignoring it.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://patch.msgid.link/20260325090023.3175348-3-m.szyprowski@samsung.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
This commit is contained in:
Marek Szyprowski
2026-03-25 10:00:18 +01:00
committed by Rob Herring (Arm)
parent abdd23c884
commit 9d5149b3f2
3 changed files with 6 additions and 5 deletions

View File

@@ -370,7 +370,7 @@ static const struct reserved_mem_ops rmem_dma_ops = {
static int __init rmem_dma_setup(unsigned long node, struct reserved_mem *rmem)
{
if (of_get_flat_dt_prop(node, "reusable", NULL))
return -EINVAL;
return -ENODEV;
#ifdef CONFIG_ARM
if (!of_get_flat_dt_prop(node, "no-map", NULL)) {