Skip to contentSkip to conversation

phy: ti: omap-usb2: Fix error handling in omap_usb2_enable_clocks

PATCH Superseded Miaoqian Lin 3 participants 4 messages Mar 16, 2022 – Apr 13, 2022 Generic PHY framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: ti: omap-usb2: Fix error handling in omap_usb2_enable_clocks

The corresponding API for clk_prepare_enable is clk_disable_unprepare, other than clk_disable_unprepare.

Fix this by changing clk_disable to clk_disable_unprepare.

Fixes ed31ee7cf1fe ("phy: ti: usb2: Fix logic on -EPROBE_DEFER")
---
 drivers/phy/ti/phy-omap-usb2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/ti/phy-omap-usb2.c +1 -1
index 3a505fe5715a..31a775877f6e 100644
@@ -215,7 +215,7 @@ static int omap_usb2_enable_clocks(struct omap_usb *phy)
 	return 0;
 
 err1:
-	clk_disable(phy->wkupclk);
+	clk_disable_unprepare(phy->wkupclk);
 
 err0:
 	return ret;
Signature · 7 lines
2.17.1


-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Miaoqian Lin

The corresponding API for clk_prepare_enable is clk_disable_unprepare, other than clk_disable_unprepare.

Fix this by changing clk_disable to clk_disable_unprepare.

There seems to be a typo in the first sentence of the commit message. Maybe something like this would do:

The corresponding API for clk_prepare_enable is clk_disable_unprepare. Make sure that the clock is unprepared on exit by changing clk_disable to clk_disable_unprepare.

Quoted 3 lines
Fixes ed31ee7cf1fe ("phy: ti: usb2: Fix logic on -EPROBE_DEFER")

Other than that,

Quoted 20 lines
---
 drivers/phy/ti/phy-omap-usb2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/ti/phy-omap-usb2.c +1 -1
index 3a505fe5715a..31a775877f6e 100644
@@ -215,7 +215,7 @@ static int omap_usb2_enable_clocks(struct omap_usb *phy)
 	return 0;
 
 err1:
-	clk_disable(phy->wkupclk);
+	clk_disable_unprepare(phy->wkupclk);
 
 err0:
 	return ret;
Signature · 1 line
2.17.1
#2 lore raw

PATCH v2 1/1 phy: ti: omap-usb2: Fix error handling in omap_usb2_enable_clocks

The corresponding API for clk_prepare_enable is clk_disable_unprepare. Make sure that the clock is unprepared on exit by changing clk_disable to clk_disable_unprepare.

Fixes ed31ee7cf1fe ("phy: ti: usb2: Fix logic on -EPROBE_DEFER")

---
changes in v2:
- fix typo in commit message.

---
 drivers/phy/ti/phy-omap-usb2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/ti/phy-omap-usb2.c +1 -1
index 3a505fe5715a..31a775877f6e 100644
@@ -215,7 +215,7 @@ static int omap_usb2_enable_clocks(struct omap_usb *phy)
 	return 0;
 
 err1:
-	clk_disable(phy->wkupclk);
+	clk_disable_unprepare(phy->wkupclk);
 
 err0:
 	return ret;
Signature · 7 lines
2.17.1


-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
maintainer Applied
#3 lore raw
Quoted 3 lines · Miaoqian Lin

The corresponding API for clk_prepare_enable is clk_disable_unprepare. Make sure that the clock is unprepared on exit by changing clk_disable to clk_disable_unprepare.

Applied, thanks

Signature · 1 line
~Vinod