security: remove redundant assignment to return variable
authorColin Ian King <colin.i.king@gmail.com>
Tue, 12 Nov 2024 12:45:32 +0000 (12:45 +0000)
committerPaul Moore <paul@paul-moore.com>
Sun, 5 Jan 2025 02:52:13 +0000 (21:52 -0500)
commit241d6a66404c975415fd0facaf70d61b37248f50
treef80b7ad3abc321ce47b482cd2f3b4649399d89a4
parent7ccbe076d987598b04b4b9c9b61f042291f9cc77
security: remove redundant assignment to return variable

In the case where rc is equal to EOPNOTSUPP it is being reassigned a
new value of zero that is never read. The following continue statement
loops back to the next iteration of the lsm_for_each_hook loop and
rc is being re-assigned a new value from the call to getselfattr.
The assignment is redundant and can be removed.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Serge Hallyn <serge@hallyn.com>
[PM: subj tweak]
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/security.c