Skip to content

Commit ab37c30

Browse files
Minghao ChiAndreas Gruenbacher
authored andcommitted
gfs2: Remove redundant NULL check before kfree
kfree on NULL pointer is a no-op. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent fdaf9a5 commit ab37c30

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

fs/gfs2/file.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,8 +1066,7 @@ static ssize_t gfs2_file_buffered_write(struct kiocb *iocb,
10661066
gfs2_glock_dq(gh);
10671067
out_uninit:
10681068
gfs2_holder_uninit(gh);
1069-
if (statfs_gh)
1070-
kfree(statfs_gh);
1069+
kfree(statfs_gh);
10711070
from->count = orig_count - written;
10721071
return written ? written : ret;
10731072
}

0 commit comments

Comments
 (0)