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

Commit 3fc3895e authored by NeilBrown's avatar NeilBrown Committed by Sebastian Reichel
Browse files

twl4030_charger: correctly handle -EPROBE_DEFER from devm_usb_get_phy_by_node



Now that twl4030_bci_probe can safely return -EPROBE_DEFER,
do so when devm_usb_get_phy_by_node returns that error.

Signed-off-by: default avatarNeilBrown <neil@brown.name>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent 7396f708
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -636,9 +636,13 @@ static int twl4030_bci_probe(struct platform_device *pdev)

		phynode = of_find_compatible_node(bci->dev->of_node->parent,
						  NULL, "ti,twl4030-usb");
		if (phynode)
		if (phynode) {
			bci->transceiver = devm_usb_get_phy_by_node(
				bci->dev, phynode, &bci->usb_nb);
			if (IS_ERR(bci->transceiver) &&
			    PTR_ERR(bci->transceiver) == -EPROBE_DEFER)
				return -EPROBE_DEFER;
		}
	}

	/* Enable interrupts now. */