diff options
author | Xu Panda <xu.panda@zte.com.cn> | 2022-09-12 10:05:36 +0000 |
---|---|---|
committer | Casey Schaufler <casey@schaufler-ca.com> | 2022-09-27 10:33:03 -0700 |
commit | d3f84f5c9627576b555976c7584514a2ca3ed02e (patch) | |
tree | f93648e1e5badabca975d5b553ca064773d958fd /security/smack | |
parent | 4ca165fc6c49c3b0100f61524ffbca4743d46e8d (diff) |
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: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Xu Panda <xu.panda@zte.com.cn>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Diffstat (limited to 'security/smack')
-rw-r--r-- | security/smack/smack_lsm.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 077bf6fd569b..de7db0b18cd5 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -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) { - int rc; struct smack_known *skp; skp = smk_of_task(smack_cred(current_cred())); - rc = smk_ptrace_rule_check(ptp, skp, PTRACE_MODE_ATTACH, __func__); - return rc; + return smk_ptrace_rule_check(ptp, skp, PTRACE_MODE_ATTACH, __func__); } /** |