Browse Source

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>
Axel Lin 10 years ago
parent
commit
f8f55393b2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/phy/phy-berlin-sata.c

+ 1 - 1
drivers/phy/phy-berlin-sata.c

@@ -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;