Sachin Kamat wrote: > > 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@xxxxxxxxxx> > --- > arch/arm/mach-exynos/setup-usb-phy.c | 8 ++++---- > 1 files changed, 4 insertions(+), 4 deletions(-) > > 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) > -- > 1.7.4.1 Well, I think, following is enough? And if you're ok on this, I will squash into your original one which is still in my tree. diff --git a/arch/arm/mach-exynos/setup-usb-phy.c b/arch/arm/mach-exynos/setup-usb-phy.c index d26deb7..3f82414 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()) { @@ -78,9 +77,8 @@ static void exynos4210_usb_phy_clkset(struct platform_device *pdev) } } clk_put(xusbxti_clk); + writel(phyclk, EXYNOS4_PHYCLK); } - - writel(phyclk, EXYNOS4_PHYCLK); } static int exynos4210_usb_phy0_init(struct platform_device *pdev) Thanks. Best regards, Kgene. -- Kukjin Kim <kgene.kim@xxxxxxxxxxx>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd. -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html