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>
This commit is contained in:
parent
8fd0ea395f
commit
f8f55393b2
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue