|
@@ -646,15 +646,11 @@ static int pci_platform_power_transition(struct pci_dev *dev, pci_power_t state)
|
|
|
error = platform_pci_set_power_state(dev, state);
|
|
|
if (!error)
|
|
|
pci_update_current_state(dev, state);
|
|
|
- /* Fall back to PCI_D0 if native PM is not supported */
|
|
|
- if (!dev->pm_cap)
|
|
|
- dev->current_state = PCI_D0;
|
|
|
- } else {
|
|
|
+ } else
|
|
|
error = -ENODEV;
|
|
|
- /* Fall back to PCI_D0 if native PM is not supported */
|
|
|
- if (!dev->pm_cap)
|
|
|
- dev->current_state = PCI_D0;
|
|
|
- }
|
|
|
+
|
|
|
+ if (error && !dev->pm_cap) /* Fall back to PCI_D0 */
|
|
|
+ dev->current_state = PCI_D0;
|
|
|
|
|
|
return error;
|
|
|
}
|