diff options
author | NeilBrown <neil@brown.name> | 2015-07-30 10:11:24 +1000 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2015-08-05 05:11:35 +0200 |
commit | 3fc3895e4fe17ee92ae1d1bb9f04da6069e8c370 (patch) | |
tree | dd8de87e8f5b3931463df3847c335d4cfbe660f3 /drivers/power/twl4030_charger.c | |
parent | 7396f708b9f1d8874dda9c6386c37b065d99b68f (diff) | |
download | talos-op-linux-3fc3895e4fe17ee92ae1d1bb9f04da6069e8c370.tar.gz talos-op-linux-3fc3895e4fe17ee92ae1d1bb9f04da6069e8c370.zip |
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: NeilBrown <neil@brown.name>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Diffstat (limited to 'drivers/power/twl4030_charger.c')
-rw-r--r-- | drivers/power/twl4030_charger.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c index 045238370d3f..ffc123fb7158 100644 --- a/drivers/power/twl4030_charger.c +++ b/drivers/power/twl4030_charger.c @@ -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. */ |