diff options
author | Ashok Raj <ashok.raj@intel.com> | 2016-11-19 00:32:46 -0800 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-12-08 12:02:25 -0600 |
commit | c4ae2adedb38240be5a1a16588406980b948a3e7 (patch) | |
tree | 53f6763b7d27e9758cd0666010dd73dbc0f1be4c /drivers/pci/hotplug/pciehp_ctrl.c | |
parent | 385895fef6b5f4723e33d0e58251c45bc708132d (diff) | |
download | op-kernel-dev-c4ae2adedb38240be5a1a16588406980b948a3e7.zip op-kernel-dev-c4ae2adedb38240be5a1a16588406980b948a3e7.tar.gz |
PCI: pciehp: Leave power indicator on when enabling already-enabled slot
If an error occurs when enabling a slot, pciehp_power_thread() turns off
the power indicator. But if the only error is that the slot was already
enabled, we should leave the power indicator on.
Return success if called to enable an already-enabled slot.
This is in the same spirit of the special handling for EEXISTS when
pciehp_configure_device() determines the slot devices already exist.
Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Diffstat (limited to 'drivers/pci/hotplug/pciehp_ctrl.c')
-rw-r--r-- | drivers/pci/hotplug/pciehp_ctrl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c index efe69e8..ec0b4c1 100644 --- a/drivers/pci/hotplug/pciehp_ctrl.c +++ b/drivers/pci/hotplug/pciehp_ctrl.c @@ -410,7 +410,7 @@ int pciehp_enable_slot(struct slot *p_slot) if (getstatus) { ctrl_info(ctrl, "Slot(%s): Already enabled\n", slot_name(p_slot)); - return -EINVAL; + return 0; } } |