diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2015-09-12 20:19:53 -0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-09-21 22:00:39 +0800 |
commit | 05db0ad8656376e341db6120758d04c247c9cf2f (patch) | |
tree | 84ce17e9abfe07f24b3057a1707f82c3f212a960 /drivers/char/hw_random | |
parent | eeb322540987d42a480cf8516fb88cda46347882 (diff) | |
download | linux-05db0ad8656376e341db6120758d04c247c9cf2f.tar.bz2 |
hwrng: mxc-rnga - Use the preferred format for kzalloc
According to Documentation/CodingStyle:
"The preferred form for passing a size of a struct is the following:
p = kmalloc(sizeof(*p), ...);"
,so do as suggested.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char/hw_random')
-rw-r--r-- | drivers/char/hw_random/mxc-rnga.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/hw_random/mxc-rnga.c b/drivers/char/hw_random/mxc-rnga.c index ed2e3ef9f347..467362262651 100644 --- a/drivers/char/hw_random/mxc-rnga.c +++ b/drivers/char/hw_random/mxc-rnga.c @@ -145,8 +145,7 @@ static int __init mxc_rnga_probe(struct platform_device *pdev) struct resource *res; struct mxc_rng *mxc_rng; - mxc_rng = devm_kzalloc(&pdev->dev, sizeof(struct mxc_rng), - GFP_KERNEL); + mxc_rng = devm_kzalloc(&pdev->dev, sizeof(*mxc_rng), GFP_KERNEL); if (!mxc_rng) return -ENOMEM; |