netfs: silence an uninitialized variable warning

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@linaro.org>
Link: https://lore.kernel.org/r/867904ba-85fe-4766-91cb-3c8ce0703c1e@stanley.mountain
Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
Dan Carpenter 2024-11-18 09:08:19 +03:00 committed by Christian Brauner
parent 8dce213952
commit 1b90b90f3f
No known key found for this signature in database
GPG Key ID: 91C61BC06578DCA2

View File

@ -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;