Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Kenji Kaneshige and committed by
Greg Kroah-Hartman
c1ef5cbd 90a1ba0c

+3 -2
+3 -2
drivers/pci/hotplug/pciehp_hpc.c
··· 711 711 retval = pcie_write_cmd(slot, slot_cmd, cmd_mask); 712 712 if (retval) { 713 713 err("%s: Write command failed!\n", __FUNCTION__); 714 - return -1; 714 + retval = -1; 715 + goto out; 715 716 } 716 717 dbg("%s: SLOTCTRL %x write cmd %x\n", 717 718 __FUNCTION__, ctrl->cap_base + SLOTCTRL, slot_cmd); ··· 723 722 * removed from the slot/adapter. 724 723 */ 725 724 msleep(1000); 726 - 725 + out: 727 726 if (changed) 728 727 pcie_unmask_bad_dllp(ctrl); 729 728