mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 17:22:07 +00:00
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:
parent
8dce213952
commit
1b90b90f3f
@ -862,7 +862,7 @@ int netfs_writeback_single(struct address_space *mapping,
|
|||||||
struct netfs_inode *ictx = netfs_inode(mapping->host);
|
struct netfs_inode *ictx = netfs_inode(mapping->host);
|
||||||
struct folio_queue *fq;
|
struct folio_queue *fq;
|
||||||
size_t size = iov_iter_count(iter);
|
size_t size = iov_iter_count(iter);
|
||||||
int ret;
|
int ret = 0;
|
||||||
|
|
||||||
if (WARN_ON_ONCE(!iov_iter_is_folioq(iter)))
|
if (WARN_ON_ONCE(!iov_iter_is_folioq(iter)))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
Loading…
Reference in New Issue
Block a user