Skip to content

Commit 1974bc7

Browse files
jamesequinlanpopcornmix
authored andcommitted
PCI: brcmstb: Fix potential premature regluator disabling
Our system for enabling and disabling regulators is designed to work only on the port driver below the root complex. The conditions to discriminate for this case should be the same when we are adding or removing the bus. Without this change the regulators may be disabled prematurely when a bus further down the tree is removed. Fixes: 9e6be01 ("PCI: brcmstb: Enable child bus device regulators from DT") Signed-off-by: Jim Quinlan <james.quinlan@broadcom.com>
1 parent b371b54 commit 1974bc7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/controller/pcie-brcmstb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@ static void brcm_pcie_remove_bus(struct pci_bus *bus)
14411441
struct subdev_regulators *sr = pcie->sr;
14421442
struct device *dev = &bus->dev;
14431443

1444-
if (!sr)
1444+
if (!sr || !bus->parent || !pci_is_root_bus(bus->parent))
14451445
return;
14461446

14471447
if (regulator_bulk_disable(sr->num_supplies, sr->supplies))

0 commit comments

Comments
 (0)