From: Jon Loeliger Date: Tue, 14 Aug 2007 14:06:45 -0500 Subject: [U-Boot-Users] [PATCH Rev 2] Fix malloc size error in ahci_init_one. Message-ID: <1187118405.32650.76.camel@ld0161-tx32> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Ed Swarthout 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 --- Wolfgang, This is a rebased version of the same patch posted on July 24. I suspect it should have gone in via the USB tree, but it hasn't. Thanks, jdl 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); -- 1.5.0.3