Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Axel Lin and committed by
Kishon Vijay Abraham I
f8f55393 8fd0ea39

+1 -1
+1 -1
drivers/phy/phy-berlin-sata.c
··· 218 218 if (priv->nphys == 0) 219 219 return -ENODEV; 220 220 221 - priv->phys = devm_kzalloc(dev, priv->nphys * sizeof(*priv->phys), 221 + priv->phys = devm_kcalloc(dev, priv->nphys, sizeof(*priv->phys), 222 222 GFP_KERNEL); 223 223 if (!priv->phys) 224 224 return -ENOMEM;