We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c8402c commit a9f17d0Copy full SHA for a9f17d0
drivers/phy/ti/phy-tusb1210.c
@@ -537,12 +537,18 @@ static int tusb1210_probe(struct ulpi *ulpi)
537
tusb1210_probe_charger_detect(tusb);
538
539
tusb->phy = ulpi_phy_create(ulpi, &phy_ops);
540
- if (IS_ERR(tusb->phy))
541
- return PTR_ERR(tusb->phy);
+ if (IS_ERR(tusb->phy)) {
+ ret = PTR_ERR(tusb->phy);
542
+ goto err_remove_charger;
543
+ }
544
545
phy_set_drvdata(tusb->phy, tusb);
546
ulpi_set_drvdata(ulpi, tusb);
547
return 0;
548
+
549
+err_remove_charger:
550
+ tusb1210_remove_charger_detect(tusb);
551
+ return ret;
552
}
553
554
static void tusb1210_remove(struct ulpi *ulpi)
0 commit comments