From: Marek Vasut Date: Sat, 23 May 2020 14:13:30 +0000 (+0200) Subject: net: eepro100: Switch from malloc()+memset() to calloc() X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6c7d3f6b3fb5860f55d1c7733d2b5929e0721e99;p=oweals%2Fu-boot.git net: eepro100: Switch from malloc()+memset() to calloc() Replace malloc()+memset() combination with calloc(), no functional change. Signed-off-by: Marek Vasut --- diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c index 74b09e9afd..8fa665743a 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() */