summaryrefslogtreecommitdiff
path: root/drivers/crypto/caam/caamrng.c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2015-08-21 13:52:00 -0300
committerHerbert Xu <herbert@gondor.apana.org.au>2015-08-24 22:07:42 +0800
commit9c4f9733e26f0d6977096fcafe71ea2ba9f0cd7c (patch)
tree4022ae408c94a729cc5483c851d028ced580847b /drivers/crypto/caam/caamrng.c
parenta3c09550f0cbd9965e44a2dc62c85ff5db91f8ff (diff)
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/caamrng.c')
-rw-r--r--drivers/crypto/caam/caamrng.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/caam/caamrng.c b/drivers/crypto/caam/caamrng.c
index fb0cc54fa70c..9b92af2c7241 100644
--- a/drivers/crypto/caam/caamrng.c
+++ b/drivers/crypto/caam/caamrng.c
@@ -351,7 +351,7 @@ static int __init caam_rng_init(void)
pr_err("Job Ring Device allocation for transform failed\n");
return PTR_ERR(dev);
}
- rng_ctx = kmalloc(sizeof(struct caam_rng_ctx), GFP_DMA);
+ rng_ctx = kmalloc(sizeof(*rng_ctx), GFP_DMA);
if (!rng_ctx) {
err = -ENOMEM;
goto free_caam_alloc;