[PATCH] remove unnecessary type casting

From: zhoun
Date: Wed Aug 10 2022 - 04:39:58 EST


From: zhounan <zhounan@xxxxxxxxxxxx>

'policy' is already a pointer to the struct aa_profile,
so there is no need to cast 'policy' when it is called.

Signed-off-by: zhounan <zhounan@xxxxxxxxxxxx>
---
security/apparmor/policy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c
index b0cbc4906cb3..9643801c4ee7 100644
--- a/security/apparmor/policy.c
+++ b/security/apparmor/policy.c
@@ -1003,7 +1003,7 @@ ssize_t aa_replace_profiles(struct aa_ns *policy_ns, struct aa_label *label,
rcu_assign_pointer(ent->new->parent, aa_get_profile(p));
} else if (policy != &ns->base) {
/* released on profile replacement or free_profile */
- struct aa_profile *p = (struct aa_profile *) policy;
+ struct aa_profile *p = policy;
rcu_assign_pointer(ent->new->parent, aa_get_profile(p));
}
}
--
2.27.0