aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/phy/ti/phy-tusb1210.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-05-05 13:03:18 -0700
committerJakub Kicinski <kuba@kernel.org>2022-05-05 13:03:18 -0700
commitc8227d568ddf2f38a8806fdcd2e20b9e11747d9a (patch)
treec49664124eb6d39839107f0e116499deef8ff5c5 /drivers/phy/ti/phy-tusb1210.c
parentnet: sparx5: Add handling of host MDB entries (diff)
parentMerge tag 'net-5.18-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net (diff)
downloadwireguard-linux-c8227d568ddf2f38a8806fdcd2e20b9e11747d9a.tar.xz
wireguard-linux-c8227d568ddf2f38a8806fdcd2e20b9e11747d9a.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
tools/testing/selftests/net/forwarding/Makefile f62c5acc800e ("selftests/net/forwarding: add missing tests to Makefile") 50fe062c806e ("selftests: forwarding: new test, verify host mdb entries") https://lore.kernel.org/all/20220502111539.0b7e4621@canb.auug.org.au/ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/phy/ti/phy-tusb1210.c')
-rw-r--r--drivers/phy/ti/phy-tusb1210.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/phy/ti/phy-tusb1210.c b/drivers/phy/ti/phy-tusb1210.c
index a0cdbcadf09e..c3ab4b69ea68 100644
--- a/drivers/phy/ti/phy-tusb1210.c
+++ b/drivers/phy/ti/phy-tusb1210.c
@@ -155,7 +155,7 @@ static int tusb1210_set_mode(struct phy *phy, enum phy_mode mode, int submode)
}
#ifdef CONFIG_POWER_SUPPLY
-const char * const tusb1210_chg_det_states[] = {
+static const char * const tusb1210_chg_det_states[] = {
"CHG_DET_CONNECTING",
"CHG_DET_START_DET",
"CHG_DET_READ_DET",
@@ -537,12 +537,18 @@ static int tusb1210_probe(struct ulpi *ulpi)
tusb1210_probe_charger_detect(tusb);
tusb->phy = ulpi_phy_create(ulpi, &phy_ops);
- if (IS_ERR(tusb->phy))
- return PTR_ERR(tusb->phy);
+ if (IS_ERR(tusb->phy)) {
+ ret = PTR_ERR(tusb->phy);
+ goto err_remove_charger;
+ }
phy_set_drvdata(tusb->phy, tusb);
ulpi_set_drvdata(ulpi, tusb);
return 0;
+
+err_remove_charger:
+ tusb1210_remove_charger_detect(tusb);
+ return ret;
}
static void tusb1210_remove(struct ulpi *ulpi)