clang-analyzer believes len can be returned uninitialized, but reading
the code this seems impossible. Anyways, let's initialize it by zero to
be able to focus on the more reports.

Signed-off-by: Ahmad Fatoum <[email protected]>
---
 drivers/nvmem/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 4e69b3fa582b..38dfb2cf2d1f 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -692,7 +692,7 @@ ssize_t nvmem_device_cell_read(struct nvmem_device *nvmem,
 {
        struct nvmem_cell cell;
        int rc;
-       ssize_t len;
+       ssize_t len = 0;
 
        if (!nvmem)
                return -EINVAL;
-- 
2.39.5


Reply via email to