diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2008-03-04 22:01:14 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-03-05 00:07:04 +0100 |
commit | c1ef5cbd03921047c2eafb998132e562043678a7 (patch) | |
tree | d9f872a179aace8fff93c121c3fdcd484f86d3b0 /drivers/pci/hotplug | |
parent | PCI: Add DECLARE_PCI_DEVICE_TABLE macro (diff) | |
download | linux-c1ef5cbd03921047c2eafb998132e562043678a7.tar.xz linux-c1ef5cbd03921047c2eafb998132e562043678a7.zip |
pci: hotplug: pciehp: fix error code path in hpc_power_off_slot
Fix the error code path in hpc_power_off_slot().
The Bad DLLP Mask bit must be restored before return.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug')
-rw-r--r-- | drivers/pci/hotplug/pciehp_hpc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 6eba9b2cfb90..698975a6a21c 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c @@ -711,7 +711,8 @@ static int hpc_power_off_slot(struct slot * slot) retval = pcie_write_cmd(slot, slot_cmd, cmd_mask); if (retval) { err("%s: Write command failed!\n", __FUNCTION__); - return -1; + retval = -1; + goto out; } dbg("%s: SLOTCTRL %x write cmd %x\n", __FUNCTION__, ctrl->cap_base + SLOTCTRL, slot_cmd); @@ -722,7 +723,7 @@ static int hpc_power_off_slot(struct slot * slot) * removed from the slot/adapter. */ msleep(1000); - + out: if (changed) pcie_unmask_bad_dllp(ctrl); |