summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorye xingchen <ye.xingchen@zte.com.cn>2022-08-30 11:41:24 +0300
committerPaul Moore <paul@paul-moore.com>2022-08-30 23:26:01 +0300
commit5698f08169b905ed215fa7f45e89b42283ed0554 (patch)
treecbda906ae14ab2c7abf1cef13e36608b38888817 /security
parent568035b01cfb107af8d2e4bd2fb9aea22cf5b868 (diff)
downloadlinux-5698f08169b905ed215fa7f45e89b42283ed0554.tar.xz
selinux: remove an unneeded variable in sel_make_class_dir_entries()
Return the value sel_make_perm_files() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> [PM: subject line tweak] Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security')
-rw-r--r--security/selinux/selinuxfs.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index 8fcdd494af27..66610eb3d317 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -1917,7 +1917,6 @@ static int sel_make_class_dir_entries(struct selinux_policy *newpolicy,
struct selinux_fs_info *fsi = sb->s_fs_info;
struct dentry *dentry = NULL;
struct inode *inode = NULL;
- int rc;
dentry = d_alloc_name(dir, "index");
if (!dentry)
@@ -1937,9 +1936,7 @@ static int sel_make_class_dir_entries(struct selinux_policy *newpolicy,
if (IS_ERR(dentry))
return PTR_ERR(dentry);
- rc = sel_make_perm_files(newpolicy, classname, index, dentry);
-
- return rc;
+ return sel_make_perm_files(newpolicy, classname, index, dentry);
}
static int sel_make_classes(struct selinux_policy *newpolicy,