tree eeb507e495f1710751afdc2da54eff6e243dcfe4 parent 8713cbefafbb5a101ade541a4b0ffa108bf697cc author Kenji Kaneshige <[EMAIL PROTECTED]> Sat, 03 Sep 2005 08:34:32 -0400 committer Len Brown <[EMAIL PROTECTED]> Sat, 03 Sep 2005 08:36:26 -0400
[ACPI] fix run-time error checking in acpi_pci_irq_disable() The 'bus' field in pci_dev structure should be checked before calling pci_read_config_byte() because pci_bus_read_config_byte() called by pci_read_config_byte() refers to 'bus' field. Signed-off-by: Kenji Kaneshige <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Len Brown <[EMAIL PROTECTED]> drivers/acpi/pci_irq.c | 5 +---- 1 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c @@ -500,7 +500,7 @@ void acpi_pci_irq_disable(struct pci_dev ACPI_FUNCTION_TRACE("acpi_pci_irq_disable"); - if (!dev) + if (!dev || !dev->bus) return_VOID; pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); @@ -508,9 +508,6 @@ void acpi_pci_irq_disable(struct pci_dev return_VOID; pin--; - if (!dev->bus) - return_VOID; - /* * First we check the PCI IRQ routing table (PRT) for an IRQ. */ - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html