virtiofs: Move the assignment to ret outside the loop
Subsystems (2)
PATCH 1/1 virtiofs: Move the assignment to ret outside the loop
There is no need to do the assignment each time. So move the assignment to ret outside the loop.
Signed-off-by Jing Xiangfeng <[email protected]>
--- fs/fuse/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fuse/dax.c +1 -1
@@ -1259,9 +1259,9 @@ static int fuse_dax_mem_range_init(struct fuse_conn_dax *fcd)pr_debug ("%s: dax mapped %ld pages. nr_ranges=%ld\n" , __func__, nr_pages, nr_ranges); + ret = -ENOMEM ;for (i =0 ; i < nr_ranges; i++) { range =kzalloc (sizeof (struct fuse_dax_mapping ),GFP_KERNEL ); - ret = -ENOMEM ;if (!range) goto out_err;
Signature · 1 line
2.26.0.106.g9fadedd