1
0
Fork 0

phy: berlin-sata: Use devm_kcalloc at appropriate place

Prefer devm_kcalloc over devm_kzalloc with multiply.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
hifive-unleashed-5.1
Axel Lin 2015-03-05 09:40:41 +08:00 committed by Kishon Vijay Abraham I
parent 8fd0ea395f
commit f8f55393b2
1 changed files with 1 additions and 1 deletions

View File

@ -218,7 +218,7 @@ static int phy_berlin_sata_probe(struct platform_device *pdev)
if (priv->nphys == 0)
return -ENODEV;
priv->phys = devm_kzalloc(dev, priv->nphys * sizeof(*priv->phys),
priv->phys = devm_kcalloc(dev, priv->nphys, sizeof(*priv->phys),
GFP_KERNEL);
if (!priv->phys)
return -ENOMEM;