From: Fabio Estevam Date: Sat, 12 Sep 2015 23:19:53 +0000 (-0300) Subject: hwrng: mxc-rnga - Use the preferred format for kzalloc X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=05db0ad8656376e341db6120758d04c247c9cf2f;p=linux-beck.git 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 --- 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;