Fix malloc size error in ahci_init_one.
PATCH 1/1 Fix malloc size error in ahci_init_one.
From: Ed Swarthout <[email protected]>
Typically this causes scsi init to corrupt the
devlist and break the coninfo command.
Fix a compiler size warning.
Signed-off-by Jason Jin <[email protected]>
Signed-off-by Ed Swarthout <[email protected]>
Acked-by Andy Fleming <[email protected]>
---
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(-)
drivers/ahci.c +2 -2
@@ -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);
Signature · 1 line
1.5.0.3
PATCH 1/1 Fix malloc size error in ahci_init_one.
Quoted 9 lines · In message <1187118405.32650.76.camel@ld0161-tx32> you wrote:
From: Ed Swarthout <[email protected]>
Typically this causes scsi init to corrupt the
devlist and break the coninfo command.
Fix a compiler size warning.Signed-off-by Jason Jin <[email protected]>Signed-off-by Ed Swarthout <[email protected]>Acked-by Andy Fleming <[email protected]>
Quoted 6 lines
---
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.
So let's go it in now. Done.
Thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de I don't see any direct evidence ... but, then, my crystal ball is in dire need of an ectoplasmic upgrade. :-) -- Howard Smith