Skip to contentSkip to conversation

phy: omap-usb2: Fix missing clk_prepare call when using old dt name

PATCH In review Axel Lin 2 participants 2 messages Mar 11, 2015 – Mar 17, 2015

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 phy: omap-usb2: Fix missing clk_prepare call when using old dt name

Current code does not call clk_prepare(phy->optclk) when using the old usb_otg_ss_refclk960m name. Fix it.

---
 drivers/phy/phy-omap-usb2.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/phy/phy-omap-usb2.c +3 -2
index 6f4aef3..dcdd850 100644
@@ -296,10 +296,11 @@ static int omap_usb2_probe(struct platform_device *pdev)
 			dev_warn(&pdev->dev,
 				 "found usb_otg_ss_refclk960m, please fix DTS\n");
 		}
-	} else {
-		clk_prepare(phy->optclk);
 	}
 
+	if (!IS_ERR(phy->optclk))
+		clk_prepare(phy->optclk);
+
 	usb_add_phy_dev(&phy->phy);
 
 	return 0;
Signature · 1 line
1.9.1
Acked-by on v1 1/1
#1 lore raw

+stable, v3.16+

Quoted 4 lines · Axel Lin

Current code does not call clk_prepare(phy->optclk) when using the old usb_otg_ss_refclk960m name. Fix it.

cheers,
-roger

Quoted 23 lines
---
 drivers/phy/phy-omap-usb2.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/phy/phy-omap-usb2.c +3 -2
index 6f4aef3..dcdd850 100644
@@ -296,10 +296,11 @@ static int omap_usb2_probe(struct platform_device *pdev)
 			dev_warn(&pdev->dev,
 				 "found usb_otg_ss_refclk960m, please fix DTS\n");
 		}
-	} else {
-		clk_prepare(phy->optclk);
 	}
 
+	if (!IS_ERR(phy->optclk))
+		clk_prepare(phy->optclk);
+
 	usb_add_phy_dev(&phy->phy);
 
 	return 0;