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
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user