Skip to contentSkip to conversation

IDE fix for current -bk

PATCH In review Andrew Morton 2 participants 2 messages Nov 26, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IDE fix for current -bk

do_ide_setup_pci_device() is returning an uninitialised ata_index_t causing an oops at bootup.

drivers/ide/setup-pci.c renamed from drivers/ide/setup-pci.c~ide-fix +1 -1
@@ -693,7 +693,7 @@ static ata_index_t do_ide_setup_pci_devi
 	int autodma = 0;
 	int pciirq = 0;
 	int tried_config = 0;
-	ata_index_t index;
+	ata_index_t index = { .b = { .low = 0xff, .high = 0xff } };
 
 	if((autodma = ide_setup_pci_controller(dev, d, noisy, &tried_config)) < 0)
 		return index;

_

#1 lore raw
Quoted 2 lines · Andrew Morton

do_ide_setup_pci_device() is returning an uninitialised ata_index_t causing an oops at bootup.

Its initialized by ide_pci_setup_ports

	index->all = 0xF0F0

but yes you are right - the error path can return it uninitialized.