Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8f55393 authored by Axel Lin's avatar Axel Lin Committed by Kishon Vijay Abraham I
Browse files

phy: berlin-sata: Use devm_kcalloc at appropriate place



Prefer devm_kcalloc over devm_kzalloc with multiply.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
parent 8fd0ea39
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;