diff options
Diffstat (limited to 'drivers/pci/pcie/pme.c')
-rw-r--r-- | drivers/pci/pcie/pme.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/pci/pcie/pme.c b/drivers/pci/pcie/pme.c index a9f9c46e5022..63fc63911295 100644 --- a/drivers/pci/pcie/pme.c +++ b/drivers/pci/pcie/pme.c | |||
@@ -397,6 +397,7 @@ static int pcie_pme_suspend(struct pcie_device *srv) | |||
397 | struct pcie_pme_service_data *data = get_service_data(srv); | 397 | struct pcie_pme_service_data *data = get_service_data(srv); |
398 | struct pci_dev *port = srv->port; | 398 | struct pci_dev *port = srv->port; |
399 | bool wakeup; | 399 | bool wakeup; |
400 | int ret; | ||
400 | 401 | ||
401 | if (device_may_wakeup(&port->dev)) { | 402 | if (device_may_wakeup(&port->dev)) { |
402 | wakeup = true; | 403 | wakeup = true; |
@@ -407,9 +408,10 @@ static int pcie_pme_suspend(struct pcie_device *srv) | |||
407 | } | 408 | } |
408 | spin_lock_irq(&data->lock); | 409 | spin_lock_irq(&data->lock); |
409 | if (wakeup) { | 410 | if (wakeup) { |
410 | enable_irq_wake(srv->irq); | 411 | ret = enable_irq_wake(srv->irq); |
411 | data->suspend_level = PME_SUSPEND_WAKEUP; | 412 | data->suspend_level = PME_SUSPEND_WAKEUP; |
412 | } else { | 413 | } |
414 | if (!wakeup || ret) { | ||
413 | struct pci_dev *port = srv->port; | 415 | struct pci_dev *port = srv->port; |
414 | 416 | ||
415 | pcie_pme_interrupt_enable(port, false); | 417 | pcie_pme_interrupt_enable(port, false); |