phy: berlin-sata: Use devm_kcalloc at appropriate place
PATCH 1/1 phy: berlin-sata: Use devm_kcalloc at appropriate place
Prefer devm_kcalloc over devm_kzalloc with multiply.
Signed-off-by Axel Lin <[email protected]>
--- drivers/phy/phy-berlin-sata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/phy-berlin-sata.c +1 -1
@@ -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 ;
Signature · 1 line
1.9.1
Quoted 3 lines · Axel Lin
Prefer
devm_kcallocoverdevm_kzallocwith multiply.Signed-off-by Axel Lin <[email protected]>
Acked-by Antoine Tenart <[email protected]>
Quoted 22 lines
--- drivers/phy/phy-berlin-sata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/phy/phy-berlin-sata.c +1
-1@@ -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 ;Signature · 1 line
1.9.1
Signature · 3 lines
Antoine Ténart, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com