projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fdaf9a5
)
gfs2: Remove redundant NULL check before kfree
author
Minghao Chi
<chi.minghao@zte.com.cn>
Thu, 2 Jun 2022 07:19:39 +0000
(07:19 +0000)
committer
Andreas Gruenbacher
<agruenba@redhat.com>
Fri, 3 Jun 2022 07:57:16 +0000
(09:57 +0200)
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>
fs/gfs2/file.c
patch
|
blob
|
history
diff --git
a/fs/gfs2/file.c
b/fs/gfs2/file.c
index 2cceb193dcd85f029023293ecc0cc6602576958a..d8f1239344c1f708fab98eb8ea5e587e6b090398 100644
(file)
--- 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;
}