aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorThomas Meyer <thomas@m3y3r.de>2011-11-17 17:43:40 -0500
committerJames Morris <jmorris@namei.org>2011-12-18 19:23:56 -0500
commit2ff6fa8fafd6fa94029fa0558a6b85956930f1f5 (patch)
treeb9e12bb9ef1a92c68bb459ae82fa4e76629bcfca /security
parentb8aa09fd880eb4c2881b9f3c8a8d09c0404cd4eb (diff)
selinux: Casting (void *) value returned by kmalloc is useless
The semantic patch that makes this change is available in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security')
-rw-r--r--security/selinux/ss/conditional.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c
index 2ec904177fe0..377d148e7157 100644
--- a/security/selinux/ss/conditional.c
+++ b/security/selinux/ss/conditional.c
@@ -175,7 +175,7 @@ void cond_policydb_destroy(struct policydb *p)
175int cond_init_bool_indexes(struct policydb *p) 175int cond_init_bool_indexes(struct policydb *p)
176{ 176{
177 kfree(p->bool_val_to_struct); 177 kfree(p->bool_val_to_struct);
178 p->bool_val_to_struct = (struct cond_bool_datum **) 178 p->bool_val_to_struct =
179 kmalloc(p->p_bools.nprim * sizeof(struct cond_bool_datum *), GFP_KERNEL); 179 kmalloc(p->p_bools.nprim * sizeof(struct cond_bool_datum *), GFP_KERNEL);
180 if (!p->bool_val_to_struct) 180 if (!p->bool_val_to_struct)
181 return -ENOMEM; 181 return -ENOMEM;