Commit 5f0110f2 authored by Kenji Kaneshige's avatar Kenji Kaneshige Committed by Len Brown

[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: default avatarKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 8713cbef
...@@ -500,7 +500,7 @@ void acpi_pci_irq_disable(struct pci_dev *dev) ...@@ -500,7 +500,7 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
ACPI_FUNCTION_TRACE("acpi_pci_irq_disable"); ACPI_FUNCTION_TRACE("acpi_pci_irq_disable");
if (!dev) if (!dev || !dev->bus)
return_VOID; return_VOID;
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
...@@ -508,9 +508,6 @@ void acpi_pci_irq_disable(struct pci_dev *dev) ...@@ -508,9 +508,6 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
return_VOID; return_VOID;
pin--; pin--;
if (!dev->bus)
return_VOID;
/* /*
* First we check the PCI IRQ routing table (PRT) for an IRQ. * First we check the PCI IRQ routing table (PRT) for an IRQ.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment