提交 f8f55393 编写于 作者: A Axel Lin 提交者: Kishon Vijay Abraham I

phy: berlin-sata: Use devm_kcalloc at appropriate place

Prefer devm_kcalloc over devm_kzalloc with multiply.
Signed-off-by: NAxel Lin <axel.lin@ingics.com>
Signed-off-by: NKishon Vijay Abraham I <kishon@ti.com>
上级 8fd0ea39
...@@ -218,7 +218,7 @@ static int phy_berlin_sata_probe(struct platform_device *pdev) ...@@ -218,7 +218,7 @@ static int phy_berlin_sata_probe(struct platform_device *pdev)
if (priv->nphys == 0) if (priv->nphys == 0)
return -ENODEV; return -ENODEV;
priv->phys = devm_kzalloc(dev, priv->nphys * sizeof(*priv->phys), priv->phys = devm_kcalloc(dev, priv->nphys, sizeof(*priv->phys),
GFP_KERNEL); GFP_KERNEL);
if (!priv->phys) if (!priv->phys)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册