浏览代码

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>
Fabio Estevam 10 年之前
父节点
当前提交
05db0ad865
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      drivers/char/hw_random/mxc-rnga.c

+ 1 - 2
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;