summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAmar <amarendra.xt@samsung.com>2013-04-27 11:42:56 +0530
committerMinkyu Kang <mk7.kang@samsung.com>2013-06-13 17:35:14 +0900
commit2b81c26b7c43f01cfaa5c4c50571b6854eece656 (patch)
treefc9aa5c02977be87065b58f4cbc248308c67b205 /arch
parenta082a2dde06142bb599551ed3dad324923a130e0 (diff)
downloadtalos-obmc-uboot-2b81c26b7c43f01cfaa5c4c50571b6854eece656.tar.gz
talos-obmc-uboot-2b81c26b7c43f01cfaa5c4c50571b6854eece656.zip
EXYNOS5: DWMMC: Initialise the local variable to avoid unwanted results.
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/armv7/exynos/clock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv7/exynos/clock.c b/arch/arm/cpu/armv7/exynos/clock.c
index 1203adaad9..e1c42462e1 100644
--- a/arch/arm/cpu/armv7/exynos/clock.c
+++ b/arch/arm/cpu/armv7/exynos/clock.c
@@ -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;
OpenPOWER on IntegriCloud