]> git.sur5r.net Git - u-boot/commitdiff
Fix malloc size error in ahci_init_one.
authorEd Swarthout <Ed.Swarthout@freescale.com>
Tue, 14 Aug 2007 19:06:45 +0000 (14:06 -0500)
committerWolfgang Denk <wd@denx.de>
Tue, 14 Aug 2007 19:30:32 +0000 (21:30 +0200)
Typically this causes scsi init to corrupt the
devlist and break the coninfo command.
Fix a compiler size warning.

Signed-off-by: Jason Jin <jason.jin@freescale.com>
Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
Acked-by: Andy Fleming <afleming@freescale.com>
drivers/ahci.c

index ccd4d71e8ae223328c729257502fbf54917649ea..3d82c625a353dfc36ec8bddeb6856cca5e9a5317 100644 (file)
@@ -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);