]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
EXYNOS5: DWMMC: Initialise the local variable to avoid unwanted results.
authorAmar <amarendra.xt@samsung.com>
Sat, 27 Apr 2013 06:12:56 +0000 (11:42 +0530)
committerMinkyu Kang <mk7.kang@samsung.com>
Thu, 13 Jun 2013 08:35:14 +0000 (17:35 +0900)
This patch initialises the local variable 'shift' to zero.
The uninitialised local variable 'shift' had garbage value and was
resulting in unwnated results in the functions exynos5_get_mmc_clk()
and exynos4_get_mmc_clk().

Signed-off-by: Amar <amarendra.xt@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
arch/arm/cpu/armv7/exynos/clock.c

index 1203adaad93104d494c672f9c27d1754e453252d..e1c42462e18ef424272ee96928704c21034a89ec 100644 (file)
@@ -611,7 +611,7 @@ static unsigned long exynos4_get_mmc_clk(int dev_index)
                (struct exynos4_clock *)samsung_get_base_clock();
        unsigned long uclk, sclk;
        unsigned int sel, ratio, pre_ratio;
-       int shift;
+       int shift = 0;
 
        sel = readl(&clk->src_fsys);
        sel = (sel >> (dev_index << 2)) & 0xf;
@@ -660,7 +660,7 @@ static unsigned long exynos5_get_mmc_clk(int dev_index)
                (struct exynos5_clock *)samsung_get_base_clock();
        unsigned long uclk, sclk;
        unsigned int sel, ratio, pre_ratio;
-       int shift;
+       int shift = 0;
 
        sel = readl(&clk->src_fsys);
        sel = (sel >> (dev_index << 2)) & 0xf;