diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-02-05 21:57:19 +0100 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-02-05 23:28:03 +0100 |
commit | 41ccebaecef50e56f822791a52b7bd9e9608e5e6 (patch) | |
tree | bfab3c754454654b0b88b5c2edcf49f2a1652af6 /drivers/pci/setup-bus.c | |
parent | PCI/PME: Remove redundant port lookup (diff) | |
download | linux-41ccebaecef50e56f822791a52b7bd9e9608e5e6.tar.xz linux-41ccebaecef50e56f822791a52b7bd9e9608e5e6.zip |
PCI/PME: Restructure pcie_pme_suspend() to prevent compiler warning
Previously we had this:
if (wakeup)
ret = enable_irq_wake(...);
if (!wakeup || ret)
...
"ret" is only evaluated when "wakeup" is true, and it is always initialized
in that case, but gcc isn't smart enough to figure that out and warns:
drivers/pci/pcie/pme.c:414:14: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
Restructure the code slightly to make it easier for gcc (and maybe for
humans as well).
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com
Diffstat (limited to 'drivers/pci/setup-bus.c')
0 files changed, 0 insertions, 0 deletions