diff mbox series

[linux-next] selinux: remove redundant variables rc

Message ID 20220830150058.300327-1-cui.jinpeng2@zte.com.cn (mailing list archive)
State In Next
Headers show
Series [linux-next] selinux: remove redundant variables rc | expand

Commit Message

CGEL Aug. 30, 2022, 3 p.m. UTC
From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>

Rturn value directly from sel_make_perm_files() instead of
getting value from redundant variable rc.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
---
 security/selinux/selinuxfs.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Paul Moore Aug. 30, 2022, 8:28 p.m. UTC | #1
On Tue, Aug 30, 2022 at 11:01 AM <cgel.zte@gmail.com> wrote:
>
> From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
>
> Rturn value directly from sel_make_perm_files() instead of
> getting value from redundant variable rc.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
> ---
>  security/selinux/selinuxfs.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)

Please don't send multiple patches to fix the exact same issue.
diff mbox series

Patch

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,