From: Minghao Chi Date: Thu, 2 Jun 2022 07:19:39 +0000 (+0000) Subject: gfs2: Remove redundant NULL check before kfree X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ab37c305bf890727dd808b1dd6526b28491915d7;p=linux.git gfs2: Remove redundant NULL check before kfree kfree on NULL pointer is a no-op. Reported-by: Zeal Robot Signed-off-by: Minghao Chi Signed-off-by: Andreas Gruenbacher --- diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 2cceb193dcd85..d8f1239344c1f 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; }