diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 04e4fe58fb0c82ad125a676a78882d8294969eaf..2b2291bfc38f8409271c735d21ab0a62adcd9179 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -327,7 +327,7 @@ int of_reserved_mem_device_init_by_idx(struct device *dev,
 
 	target = of_parse_phandle(np, "memory-region", idx);
 	if (!target)
-		return -EINVAL;
+		return -ENODEV;
 
 	rmem = __find_rmem(target);
 	of_node_put(target);