Skip to contentSkip to conversation

fs: remove unnecessary condition check

PATCH New Chengguang Xu 1 participant 1 message Oct 10, 2020 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: remove unnecessary condition check

posix_acl_release() does NULL pointer check itself so don't have to check it explicitly.

---
 fs/posix_acl.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
fs/posix_acl.c +2 -4
index 95882b3f5f62..194c24ee8ba0 100644
@@ -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;
 }
Signature · 1 line
2.26.2