aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/file.c
diff options
context:
space:
mode:
authorMinghao Chi <chi.minghao@zte.com.cn>2022-06-02 07:19:39 +0000
committerAndreas Gruenbacher <agruenba@redhat.com>2022-06-03 09:57:16 +0200
commitab37c305bf890727dd808b1dd6526b28491915d7 (patch)
tree886b85bd438149f7d35bc31cfab323a6fb0006d3 /fs/gfs2/file.c
parentfdaf9a5840acaab18694a19e0eb0aa51162eeeed (diff)
downloadlinux-ab37c305bf890727dd808b1dd6526b28491915d7.tar.gz
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>
Diffstat (limited to 'fs/gfs2/file.c')
-rw-r--r--fs/gfs2/file.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 2cceb193dcd85f..d8f1239344c1f7 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -1066,8 +1066,7 @@ out_unlock:
gfs2_glock_dq(gh);
out_uninit:
gfs2_holder_uninit(gh);
- if (statfs_gh)
- kfree(statfs_gh);
+ kfree(statfs_gh);
from->count = orig_count - written;
return written ? written : ret;
}