From: Ed Swarthout Date: Tue, 14 Aug 2007 19:06:45 +0000 (-0500) Subject: Fix malloc size error in ahci_init_one. X-Git-Tag: v1.3.0-rc1~19^2~15 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=594e79838ce5078a90d0c27abb2b2d61d5f8e8a7;p=u-boot Fix malloc size error in ahci_init_one. Typically this causes scsi init to corrupt the devlist and break the coninfo command. Fix a compiler size warning. Signed-off-by: Jason Jin Signed-off-by: Ed Swarthout Acked-by: Andy Fleming --- diff --git a/drivers/ahci.c b/drivers/ahci.c index ccd4d71e8a..3d82c625a3 100644 --- a/drivers/ahci.c +++ b/drivers/ahci.c @@ -259,8 +259,8 @@ static int ahci_init_one(pci_dev_t pdev) memset((void *)ataid, 0, sizeof(hd_driveid_t *) * AHCI_MAX_PORTS); - probe_ent = malloc(sizeof(probe_ent)); - memset(probe_ent, 0, sizeof(probe_ent)); + probe_ent = malloc(sizeof(struct ahci_probe_ent)); + memset(probe_ent, 0, sizeof(struct ahci_probe_ent)); probe_ent->dev = pdev; pci_read_config_dword(pdev, AHCI_PCI_BAR, &iobase);