diff options
author | Ed Swarthout <Ed.Swarthout@freescale.com> | 2007-08-14 14:06:45 -0500 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2007-08-14 21:30:32 +0200 |
commit | 594e79838ce5078a90d0c27abb2b2d61d5f8e8a7 (patch) | |
tree | 0c6dab1729b08e096f6769971fe8d53e848f38cb /drivers/ahci.c | |
parent | b361acd64fd2525c081b9b288b0804efe209c0e9 (diff) | |
download | u-boot-imx-594e79838ce5078a90d0c27abb2b2d61d5f8e8a7.zip u-boot-imx-594e79838ce5078a90d0c27abb2b2d61d5f8e8a7.tar.gz u-boot-imx-594e79838ce5078a90d0c27abb2b2d61d5f8e8a7.tar.bz2 |
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 <jason.jin@freescale.com>
Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'drivers/ahci.c')
-rw-r--r-- | drivers/ahci.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ahci.c b/drivers/ahci.c index ccd4d71..3d82c62 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); |