summaryrefslogtreecommitdiff
path: root/drivers/crypto/caam/caamalg.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2015-08-21 19:52:00 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2015-08-24 17:07:42 +0300
commit9c4f9733e26f0d6977096fcafe71ea2ba9f0cd7c (patch)
tree4022ae408c94a729cc5483c851d028ced580847b /drivers/crypto/caam/caamalg.c
parenta3c09550f0cbd9965e44a2dc62c85ff5db91f8ff (diff)
downloadlinux-9c4f9733e26f0d6977096fcafe71ea2ba9f0cd7c.tar.xz
crypto: caam - Use the preferred style for memory allocations
"The preferred form for passing a size of a struct is the following: p = kmalloc(sizeof(*p), ...); .... The preferred form for allocating a zeroed array is the following: p = kcalloc(n, sizeof(...), ...); " ,so do as suggested. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Reviewed-by: Horia Geant? <horia.geanta@freescale.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam/caamalg.c')
-rw-r--r--drivers/crypto/caam/caamalg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c
index 83d2306ce7ab..ba79d638f782 100644
--- a/drivers/crypto/caam/caamalg.c
+++ b/drivers/crypto/caam/caamalg.c
@@ -4314,7 +4314,7 @@ static struct caam_crypto_alg *caam_alg_alloc(struct caam_alg_template
struct caam_crypto_alg *t_alg;
struct crypto_alg *alg;
- t_alg = kzalloc(sizeof(struct caam_crypto_alg), GFP_KERNEL);
+ t_alg = kzalloc(sizeof(*t_alg), GFP_KERNEL);
if (!t_alg) {
pr_err("failed to allocate t_alg\n");
return ERR_PTR(-ENOMEM);