Commit d3f84f5c authored by Xu Panda's avatar Xu Panda Committed by Casey Schaufler

smack: lsm: remove the unneeded result variable

Return the value smk_ptrace_rule_check() directly instead of storing it
in another redundant variable.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarXu Panda <xu.panda@zte.com.cn>
Signed-off-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
parent 4ca165fc
...@@ -496,13 +496,11 @@ static int smack_ptrace_access_check(struct task_struct *ctp, unsigned int mode) ...@@ -496,13 +496,11 @@ static int smack_ptrace_access_check(struct task_struct *ctp, unsigned int mode)
*/ */
static int smack_ptrace_traceme(struct task_struct *ptp) static int smack_ptrace_traceme(struct task_struct *ptp)
{ {
int rc;
struct smack_known *skp; struct smack_known *skp;
skp = smk_of_task(smack_cred(current_cred())); skp = smk_of_task(smack_cred(current_cred()));
rc = smk_ptrace_rule_check(ptp, skp, PTRACE_MODE_ATTACH, __func__); return smk_ptrace_rule_check(ptp, skp, PTRACE_MODE_ATTACH, __func__);
return rc;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment