diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index acd82ff41951f..3ba68baeed1db 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -314,7 +314,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; }