summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>2026-09-09 17:28:29 +0200
committerBjorn Helgaas <bhelgaas@google.com>2026-10-21 13:15:28 -0500
commitb6087ff2b7a4c9f98c78f56f0f357557fc008768 (patch)
tree87eb8294c057d2fbd33277a7004896499138c9eb /include/linux
parent7bf2ebcb7ca1e8814d3d0e35214a8e4b2193a619 (diff)
PCI/pwrctrl: Power off child devices on power-on failure
pci_pwrctrl_power_on_device() recursively powers on the child nodes of a device before powering on the device itself. If powering on a child fails (e.g. returning -EPROBE_DEFER), the function returned immediately, leaving the sibling children that were already powered on in the same loop iteration enabled. Since probe deferral is a standard boot path, this leads to unbounded regulator and clock enable increments across retries. The error path in pci_pwrctrl_power_on_devices() only powers off the top-level children processed before the failing one and explicitly stops at it, so it can never clean up the siblings leaked deeper in the failed subtree. Power off the sibling children that were successfully powered on before a child fails, and power off all children if the device's own power_on() fails after its children were already enabled. Switch to a manual child iterator so the failing node can be tracked and its reference released in the error path. Fixes: b35cf3b6aa1e ("PCI/pwrctrl: Add APIs to power on/off pwrctrl devices") Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com> Link: https://patch.msgid.link/20260909-pwrtctl-power-on-rallback-v1-1-412ef996ba27@oss.qualcomm.com
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions