Cleanup: Remove unnecessary explicit casts of pointers from allocators

The Linux 5.16.14 kernel's coccicheck caught these. The semantic patch
that caught them was:

./scripts/coccinelle/api/alloc/alloc_cast.cocci

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14372
This commit is contained in:
Richard Yao
2023-01-10 14:03:46 -05:00
committed by Brian Behlendorf
parent 80d64bb85f
commit 7384ec65cd
9 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -88,7 +88,7 @@ crypto_create_ctx_template(crypto_mechanism_t *mech, crypto_key_t *key,
if (error != CRYPTO_SUCCESS)
return (error);
if ((ctx_tmpl = (kcf_ctx_template_t *)kmem_alloc(
if ((ctx_tmpl = kmem_alloc(
sizeof (kcf_ctx_template_t), KM_SLEEP)) == NULL) {
KCF_PROV_REFRELE(pd);
return (CRYPTO_HOST_MEMORY);