mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
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:
committed by
Rob Herring (Arm)
parent
abdd23c884
commit
9d5149b3f2
@@ -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)) {
|
||||
|
||||
@@ -483,7 +483,7 @@ static int __init rmem_cma_setup(unsigned long node, struct reserved_mem *rmem)
|
||||
|
||||
if (!of_get_flat_dt_prop(node, "reusable", NULL) ||
|
||||
of_get_flat_dt_prop(node, "no-map", NULL))
|
||||
return -EINVAL;
|
||||
return -ENODEV;
|
||||
|
||||
if (!IS_ALIGNED(rmem->base | rmem->size, CMA_MIN_ALIGNMENT_BYTES)) {
|
||||
pr_err("Reserved memory: incorrect alignment of CMA region\n");
|
||||
|
||||
Reference in New Issue
Block a user