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>
This commit is contained in:
Kenji Kaneshige 2008-03-04 13:01:14 -08:00 committed by Greg Kroah-Hartman
parent 90a1ba0c5e
commit c1ef5cbd03
1 changed files with 3 additions and 2 deletions

View File

@ -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);