net: bcmgenet: use kcalloc instead of kzalloc
There were two places that used kzalloc() with a multiplied sizeof(), replace these with kcalloc as recommended by checkpatch.pl. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
8900ea570a
commit
c489be085a
@@ -381,7 +381,7 @@ static int bcmgenet_mii_alloc(struct bcmgenet_priv *priv)
|
||||
snprintf(bus->id, MII_BUS_ID_SIZE, "%s-%d",
|
||||
priv->pdev->name, priv->pdev->id);
|
||||
|
||||
bus->irq = kzalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL);
|
||||
bus->irq = kcalloc(PHY_MAX_ADDR, sizeof(int), GFP_KERNEL);
|
||||
if (!bus->irq) {
|
||||
mdiobus_free(priv->mii_bus);
|
||||
return -ENOMEM;
|
||||
|
Reference in New Issue
Block a user