Smatch complains that "ret" is uninitialized on the success path if we don't enter the nested loop at the end of the function. In real life we will enter that loop so "ret" will be zero. Generally, I don't endorse silencing static checker warnings but in this case, I think it make sense. Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> --- fs/netfs/write_issue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/netfs/write_issue.c b/fs/netfs/write_issue.c index cd2b349243b3..8f02d8effe78 100644 --- a/fs/netfs/write_issue.c +++ b/fs/netfs/write_issue.c @@ -862,7 +862,7 @@ int netfs_writeback_single(struct address_space *mapping, struct netfs_inode *ictx = netfs_inode(mapping->host); struct folio_queue *fq; size_t size = iov_iter_count(iter); - int ret; + int ret = 0; if (WARN_ON_ONCE(!iov_iter_is_folioq(iter))) return -EIO; -- 2.45.2