diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2005-09-03 00:34:32 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-09-03 00:36:26 -0400 |
commit | 5f0110f2a716376f3b260703835f527ca8900946 (patch) | |
tree | eeb507e495f1710751afdc2da54eff6e243dcfe4 /drivers | |
parent | 8713cbefafbb5a101ade541a4b0ffa108bf697cc (diff) |
[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 <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/pci_irq.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index 2bbfba8e8c6d..09567c2edcfb 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c | |||
@@ -500,7 +500,7 @@ void acpi_pci_irq_disable(struct pci_dev *dev) | |||
500 | 500 | ||
501 | ACPI_FUNCTION_TRACE("acpi_pci_irq_disable"); | 501 | ACPI_FUNCTION_TRACE("acpi_pci_irq_disable"); |
502 | 502 | ||
503 | if (!dev) | 503 | if (!dev || !dev->bus) |
504 | return_VOID; | 504 | return_VOID; |
505 | 505 | ||
506 | pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); | 506 | pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin); |
@@ -508,9 +508,6 @@ void acpi_pci_irq_disable(struct pci_dev *dev) | |||
508 | return_VOID; | 508 | return_VOID; |
509 | pin--; | 509 | pin--; |
510 | 510 | ||
511 | if (!dev->bus) | ||
512 | return_VOID; | ||
513 | |||
514 | /* | 511 | /* |
515 | * First we check the PCI IRQ routing table (PRT) for an IRQ. | 512 | * First we check the PCI IRQ routing table (PRT) for an IRQ. |
516 | */ | 513 | */ |