aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2008-12-16 14:06:58 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-01-07 14:12:56 -0500
commitbebd590ca27e80ffe3129ab4f0a3124f0a340f43 (patch)
tree6b303ff88ede1dbd4e4ce0520e0fedd350127d7e
parentf0e88af855cbc5012f2e796f42686969b82d79d4 (diff)
PCI: fix incorrect error return in pci_enable_wake
This patch (as1186) fixes a minor mistake in pci_enable_wake(). When the routine is asked to disable remote wakeup, it should not return an error merely because the device is not allowed to do wakeups! Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
-rw-r--r--drivers/pci/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index d4d71fae6233..1fb7cff4cdae 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1091,7 +1091,7 @@ int pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable)
1091 int error = 0; 1091 int error = 0;
1092 bool pme_done = false; 1092 bool pme_done = false;
1093 1093
1094 if (!device_may_wakeup(&dev->dev)) 1094 if (enable && !device_may_wakeup(&dev->dev))
1095 return -EINVAL; 1095 return -EINVAL;
1096 1096
1097 /* 1097 /*