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>
 
        ACPI_FUNCTION_TRACE("acpi_pci_irq_disable");
 
-       if (!dev)
+       if (!dev || !dev->bus)
                return_VOID;
 
        pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
                return_VOID;
        pin--;
 
-       if (!dev->bus)
-               return_VOID;
-
        /*
         * First we check the PCI IRQ routing table (PRT) for an IRQ.
         */