PCI: rockchip: dw: Fix unblance pm call for fake probe

We move all the probe stuff to kthread so that it won't block
the system to go on probing other drivers. But that introduced
a bug that PM calls would not be removed by driver core. As each
platform driver uses the same PM callbacks for all device instances.
So add device_release_driver if it fails to probe devices.

Fixes: 79ac46bdea ("PCI: rockchip: dw: Add kthread to probe PCIe devices")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: I9d6ba448a87defa8d924927f1bfcff51c889e1a0
This commit is contained in:
Shawn Lin
2021-12-01 17:54:28 +08:00
parent 3be978903a
commit e2a2addf37

View File

@@ -1840,6 +1840,8 @@ deinit_clk:
disable_vpcie3v3:
rk_pcie_disable_power(rk_pcie);
device_release_driver(dev);
return ret;
}