aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut+renesas@gmail.com>2020-05-23 16:13:30 +0200
committerMarek Vasut <marek.vasut+renesas@gmail.com>2020-06-18 19:34:40 +0200
commit6c7d3f6b3fb5860f55d1c7733d2b5929e0721e99 (patch)
treefe6632dac2f9d3c6ec5810aac6f055f49765aa52 /drivers
parent3a15684dc6ecc9dcc74e3a9357d8e91ebd50aed7 (diff)
downloadu-boot-6c7d3f6b3fb5860f55d1c7733d2b5929e0721e99.zip
u-boot-6c7d3f6b3fb5860f55d1c7733d2b5929e0721e99.tar.gz
u-boot-6c7d3f6b3fb5860f55d1c7733d2b5929e0721e99.tar.bz2
net: eepro100: Switch from malloc()+memset() to calloc()
Replace malloc()+memset() combination with calloc(), no functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/eepro100.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index 74b09e9..8fa6657 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -746,12 +746,11 @@ int eepro100_initialize(bd_t *bis)
continue;
}
- dev = (struct eth_device *)malloc(sizeof(*dev));
+ dev = calloc(1, sizeof(*dev));
if (!dev) {
printf("eepro100: Can not allocate memory\n");
break;
}
- memset(dev, 0, sizeof(*dev));
sprintf(dev->name, "i82559#%d", card_number);
dev->priv = (void *)devno; /* this have to come before bus_to_phys() */