diff mbox

[1/1] ARM: EXYNOS: Fix compilation warning in setup-usb-phy.c file

Message ID 1341899860-17979-1-git-send-email-sachin.kamat@linaro.org
State Accepted
Headers show

Commit Message

Sachin Kamat July 10, 2012, 5:57 a.m. UTC
Fixes the following warning:
arch/arm/mach-exynos/setup-usb-phy.c: In function ‘exynos4210_usb_phy_clkset’:
arch/arm/mach-exynos/setup-usb-phy.c:83:2:
warning: ‘phyclk’ may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 arch/arm/mach-exynos/setup-usb-phy.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c
index d26deb7..1eaa0b0 100644
--- a/arch/arm/mach-exynos/setup-usb-phy.c
+++ b/arch/arm/mach-exynos/setup-usb-phy.c
@@ -31,7 +31,6 @@  static void exynos4210_usb_phy_clkset(struct platform_device *pdev)
 	struct clk *xusbxti_clk;
 	u32 phyclk;
 
-
 	xusbxti_clk = clk_get(&pdev->dev, "xusbxti");
 	if (xusbxti_clk && !IS_ERR(xusbxti_clk)) {
 		if (soc_is_exynos4210()) {
@@ -50,6 +49,8 @@  static void exynos4210_usb_phy_clkset(struct platform_device *pdev)
 				phyclk |= EXYNOS4210_CLKSEL_48M;
 				break;
 			}
+			clk_put(xusbxti_clk);
+			writel(phyclk, EXYNOS4_PHYCLK);
 		} else if (soc_is_exynos4212() || soc_is_exynos4412()) {
 			/* set clock frequency for PLL */
 			phyclk = readl(EXYNOS4_PHYCLK) & ~EXYNOS4X12_CLKSEL_MASK;
@@ -76,11 +77,10 @@  static void exynos4210_usb_phy_clkset(struct platform_device *pdev)
 				phyclk |= EXYNOS4X12_CLKSEL_24M;
 				break;
 			}
+			clk_put(xusbxti_clk);
+			writel(phyclk, EXYNOS4_PHYCLK);
 		}
-		clk_put(xusbxti_clk);
 	}
-
-	writel(phyclk, EXYNOS4_PHYCLK);
 }
 
 static int exynos4210_usb_phy0_init(struct platform_device *pdev)