From 05db0ad8656376e341db6120758d04c247c9cf2f Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Sat, 12 Sep 2015 20:19:53 -0300 Subject: [PATCH] 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 Signed-off-by: Herbert Xu --- drivers/char/hw_random/mxc-rnga.c | 3 +-- 1 file changed, 1 insertion(+), 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; -- 2.20.1