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>
This commit is contained in:
Minghao Chi 2022-06-02 07:19:39 +00:00 committed by Andreas Gruenbacher
parent fdaf9a5840
commit ab37c305bf

View File

@ -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;
}