posix_acl_release() does NULL pointer check itself so don't have to check it explicitly. Signed-off-by: Chengguang Xu <cgxu519@xxxxxxxxxxxx> --- fs/posix_acl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/posix_acl.c b/fs/posix_acl.c index 95882b3f5f62..194c24ee8ba0 100644 --- a/fs/posix_acl.c +++ b/fs/posix_acl.c @@ -950,9 +950,7 @@ int simple_acl_create(struct inode *dir, struct inode *inode) set_cached_acl(inode, ACL_TYPE_DEFAULT, default_acl); set_cached_acl(inode, ACL_TYPE_ACCESS, acl); - if (default_acl) - posix_acl_release(default_acl); - if (acl) - posix_acl_release(acl); + posix_acl_release(default_acl); + posix_acl_release(acl); return 0; } -- 2.26.2