aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pv210/cpufreq.c
diff options
context:
space:
mode:
authorJonghwan Choi <jhbird.choi@samsung.com>2011-05-12 05:31:20 -0400
committerKukjin Kim <kgene.kim@samsung.com>2011-06-01 18:06:35 -0400
commitd62fa31123d557bca9a1e3b5da9672e8cc9753db (patch)
tree7a959b4b5ba2477b0d38109ca04471171429def6 /arch/arm/mach-s5pv210/cpufreq.c
parent55922c9d1b84b89cb946c777fddccb3247e7df2c (diff)
ARM: S5PV210: Fix possible null pointer dereference
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pv210/cpufreq.c')
-rw-r--r--arch/arm/mach-s5pv210/cpufreq.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/mach-s5pv210/cpufreq.c b/arch/arm/mach-s5pv210/cpufreq.c
index 22046e2f53c..153af8b359e 100644
--- a/arch/arm/mach-s5pv210/cpufreq.c
+++ b/arch/arm/mach-s5pv210/cpufreq.c
@@ -101,12 +101,14 @@ static void s5pv210_set_refresh(enum s5pv210_dmc_port ch, unsigned long freq)
101 unsigned long tmp, tmp1; 101 unsigned long tmp, tmp1;
102 void __iomem *reg = NULL; 102 void __iomem *reg = NULL;
103 103
104 if (ch == DMC0) 104 if (ch == DMC0) {
105 reg = (S5P_VA_DMC0 + 0x30); 105 reg = (S5P_VA_DMC0 + 0x30);
106 else if (ch == DMC1) 106 } else if (ch == DMC1) {
107 reg = (S5P_VA_DMC1 + 0x30); 107 reg = (S5P_VA_DMC1 + 0x30);
108 else 108 } else {
109 printk(KERN_ERR "Cannot find DMC port\n"); 109 printk(KERN_ERR "Cannot find DMC port\n");
110 return;
111 }
110 112
111 /* Find current DRAM frequency */ 113 /* Find current DRAM frequency */
112 tmp = s5pv210_dram_conf[ch].freq; 114 tmp = s5pv210_dram_conf[ch].freq;