drivers/e1000: malloc size error
priv->mta is uint32_t Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
This commit is contained in:
parent
ebf1ab5392
commit
500d193096
1 changed files with 1 additions and 1 deletions
|
@ -1482,7 +1482,7 @@ static int e1000_probe(FAR struct pci_device_s *dev)
|
||||||
#ifdef CONFIG_NET_MCASTGROUP
|
#ifdef CONFIG_NET_MCASTGROUP
|
||||||
/* Allocate MTA shadow */
|
/* Allocate MTA shadow */
|
||||||
|
|
||||||
priv->mta = kmm_zalloc(type->mta_regs);
|
priv->mta = kmm_zalloc(type->mta_regs * sizeof(*priv->mta));
|
||||||
if (priv->mta == NULL)
|
if (priv->mta == NULL)
|
||||||
{
|
{
|
||||||
nerr("alloc mta failed\n");
|
nerr("alloc mta failed\n");
|
||||||
|
|
Loading…
Reference in a new issue