diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-09-28 15:44:36 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2011-10-14 12:05:32 -0400 |
commit | 78d090b0be3f072a3c95022771c35183af961aaa (patch) | |
tree | ce8de79a4ab712a8c34e2abda68bcacde5173c40 /drivers/pci | |
parent | 6af8bef14d6fc9e4e52c83fd646412e9dedadd26 (diff) |
PCI / PM: Remove unnecessary error variable from acpi_dev_run_wake()
The result returned by acpi_dev_run_wake() is always either -EINVAL
or -ENODEV, while obviously it should return 0 on success. The
problem is that the leftover error variable, that's not really used
in the function, is initialized with -ENODEV and then returned
without modification.
To fix this issue remove the error variable from acpi_dev_run_wake()
and make the function return 0 on success as appropriate.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci-acpi.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index cd3c4f1cdf1b..4ecb6408b0d6 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
@@ -285,7 +285,6 @@ static int acpi_dev_run_wake(struct device *phys_dev, bool enable) | |||
285 | { | 285 | { |
286 | struct acpi_device *dev; | 286 | struct acpi_device *dev; |
287 | acpi_handle handle; | 287 | acpi_handle handle; |
288 | int error = -ENODEV; | ||
289 | 288 | ||
290 | if (!device_run_wake(phys_dev)) | 289 | if (!device_run_wake(phys_dev)) |
291 | return -EINVAL; | 290 | return -EINVAL; |
@@ -305,7 +304,7 @@ static int acpi_dev_run_wake(struct device *phys_dev, bool enable) | |||
305 | acpi_disable_wakeup_device_power(dev); | 304 | acpi_disable_wakeup_device_power(dev); |
306 | } | 305 | } |
307 | 306 | ||
308 | return error; | 307 | return 0; |
309 | } | 308 | } |
310 | 309 | ||
311 | static void acpi_pci_propagate_run_wake(struct pci_bus *bus, bool enable) | 310 | static void acpi_pci_propagate_run_wake(struct pci_bus *bus, bool enable) |