aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/dsa')
-rw-r--r--drivers/net/dsa/b53/b53_common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 5e010b1592f7..d93c790bfbe8 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -2044,14 +2044,14 @@ static int b53_switch_init(struct b53_device *dev)
2044 } 2044 }
2045 } 2045 }
2046 2046
2047 dev->ports = devm_kzalloc(dev->dev, 2047 dev->ports = devm_kcalloc(dev->dev,
2048 sizeof(struct b53_port) * dev->num_ports, 2048 dev->num_ports, sizeof(struct b53_port),
2049 GFP_KERNEL); 2049 GFP_KERNEL);
2050 if (!dev->ports) 2050 if (!dev->ports)
2051 return -ENOMEM; 2051 return -ENOMEM;
2052 2052
2053 dev->vlans = devm_kzalloc(dev->dev, 2053 dev->vlans = devm_kcalloc(dev->dev,
2054 sizeof(struct b53_vlan) * dev->num_vlans, 2054 dev->num_vlans, sizeof(struct b53_vlan),
2055 GFP_KERNEL); 2055 GFP_KERNEL);
2056 if (!dev->vlans) 2056 if (!dev->vlans)
2057 return -ENOMEM; 2057 return -ENOMEM;