mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 07:33:19 +02:00
PCI/pwrctrl: Fix device leak at device stop
Make sure to drop the reference to the pwrctrl device taken by
of_find_device_by_node() when stopping a PCI device.
Fixes: 681725afb6 ("PCI/pwrctl: Remove pwrctl device without iterating over all children of pwrctl parent")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Cc: stable@vger.kernel.org # v6.13
Link: https://patch.msgid.link/20250721153609.8611-4-johan+linaro@kernel.org
This commit is contained in:
parent
e24bbbe078
commit
dc32e9346b
|
|
@ -31,6 +31,8 @@ static void pci_pwrctrl_unregister(struct device *dev)
|
|||
return;
|
||||
|
||||
of_device_unregister(pdev);
|
||||
put_device(&pdev->dev);
|
||||
|
||||
of_node_clear_flag(np, OF_POPULATED);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user