diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index 1a3460a8e73ab..9b6ab83956c3b 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -545,7 +545,9 @@ static int nvmem_add_cells_from_of(struct nvmem_device *nvmem) for_each_child_of_node(parent, child) { addr = of_get_property(child, "reg", &len); - if (!addr || (len < 2 * sizeof(u32))) { + if (!addr) + continue; + if (len < 2 * sizeof(u32)) { dev_err(dev, "nvmem: invalid reg on %pOF\n", child); return -EINVAL; }