Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50277c8b authored by Yijing Wang's avatar Yijing Wang Committed by Bjorn Helgaas
Browse files

PCI: pciehp: Don't turn slot off when hot-added device already exists



If we found device already exists during hot add device, we should leave
it, not turn the slot off.

Signed-off-by: default avatarYijing Wang <wangyijing@huawei.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 50b52fde
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -233,6 +233,7 @@ static int board_added(struct slot *p_slot)
	if (retval) {
		ctrl_err(ctrl, "Cannot add device at %04x:%02x:00\n",
			 pci_domain_nr(parent), parent->number);
		if (retval != -EEXIST)
			goto err_exit;
	}

+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ int pciehp_configure_device(struct slot *p_slot)
			 "at %04x:%02x:00, cannot hot-add\n", pci_name(dev),
			 pci_domain_nr(parent), parent->number);
		pci_dev_put(dev);
		ret = -EINVAL;
		ret = -EEXIST;
		goto out;
	}