|
|
31004e6 |
From cc5de4333e4d45063ef5c62e424fa9c3ca01caae Mon Sep 17 00:00:00 2001
|
|
|
31004e6 |
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
|
|
|
31004e6 |
Date: Sat, 27 Apr 2013 21:49:14 +0200
|
|
|
f74b50e |
Subject: [PATCH 366/482] * grub-core/disk/ahci.c (grub_ahci_pciinit):
|
|
|
31004e6 |
Fix handling of empty ports.
|
|
|
31004e6 |
|
|
|
31004e6 |
---
|
|
|
31004e6 |
ChangeLog | 5 +++++
|
|
|
31004e6 |
grub-core/disk/ahci.c | 8 ++++----
|
|
|
31004e6 |
2 files changed, 9 insertions(+), 4 deletions(-)
|
|
|
31004e6 |
|
|
|
31004e6 |
diff --git a/ChangeLog b/ChangeLog
|
|
|
31004e6 |
index 0f3eaf6..317a367 100644
|
|
|
31004e6 |
--- a/ChangeLog
|
|
|
31004e6 |
+++ b/ChangeLog
|
|
|
31004e6 |
@@ -1,3 +1,8 @@
|
|
|
31004e6 |
+2013-04-27 Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
31004e6 |
+
|
|
|
31004e6 |
+ * grub-core/disk/ahci.c (grub_ahci_pciinit): Fix handling of empty
|
|
|
31004e6 |
+ ports.
|
|
|
31004e6 |
+
|
|
|
31004e6 |
2013-04-27 Leon Drugi <eyak>
|
|
|
31004e6 |
|
|
|
31004e6 |
* grub-core/loader/multiboot_mbi2.c (grub_multiboot_load): Fix cast in
|
|
|
31004e6 |
diff --git a/grub-core/disk/ahci.c b/grub-core/disk/ahci.c
|
|
|
31004e6 |
index 29fe246..47fd423 100644
|
|
|
31004e6 |
--- a/grub-core/disk/ahci.c
|
|
|
31004e6 |
+++ b/grub-core/disk/ahci.c
|
|
|
31004e6 |
@@ -350,7 +350,7 @@ grub_ahci_pciinit (grub_pci_device_t dev,
|
|
|
31004e6 |
continue;
|
|
|
31004e6 |
}
|
|
|
31004e6 |
|
|
|
31004e6 |
- adevs[i] = grub_malloc (sizeof (*adevs[i]));
|
|
|
31004e6 |
+ adevs[i] = grub_zalloc (sizeof (*adevs[i]));
|
|
|
31004e6 |
if (!adevs[i])
|
|
|
31004e6 |
return 1;
|
|
|
31004e6 |
|
|
|
31004e6 |
@@ -619,9 +619,9 @@ grub_ahci_pciinit (grub_pci_device_t dev,
|
|
|
31004e6 |
for (i = 0; i < nports; i++)
|
|
|
31004e6 |
if (failed_adevs[i])
|
|
|
31004e6 |
{
|
|
|
31004e6 |
- grub_dma_free (adevs[i]->command_list_chunk);
|
|
|
31004e6 |
- grub_dma_free (adevs[i]->command_table_chunk);
|
|
|
31004e6 |
- grub_dma_free (adevs[i]->rfis);
|
|
|
31004e6 |
+ grub_dma_free (failed_adevs[i]->command_list_chunk);
|
|
|
31004e6 |
+ grub_dma_free (failed_adevs[i]->command_table_chunk);
|
|
|
31004e6 |
+ grub_dma_free (failed_adevs[i]->rfis);
|
|
|
31004e6 |
}
|
|
|
31004e6 |
|
|
|
31004e6 |
for (i = 0; i < nports; i++)
|
|
|
31004e6 |
--
|
|
|
31004e6 |
1.8.2.1
|
|
|
31004e6 |
|