Commit d62fa311 authored by Jonghwan Choi's avatar Jonghwan Choi Committed by Kukjin Kim

ARM: S5PV210: Fix possible null pointer dereference

Signed-off-by: default avatarJonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
parent 55922c9d
...@@ -101,12 +101,14 @@ static void s5pv210_set_refresh(enum s5pv210_dmc_port ch, unsigned long freq) ...@@ -101,12 +101,14 @@ static void s5pv210_set_refresh(enum s5pv210_dmc_port ch, unsigned long freq)
unsigned long tmp, tmp1; unsigned long tmp, tmp1;
void __iomem *reg = NULL; void __iomem *reg = NULL;
if (ch == DMC0) if (ch == DMC0) {
reg = (S5P_VA_DMC0 + 0x30); reg = (S5P_VA_DMC0 + 0x30);
else if (ch == DMC1) } else if (ch == DMC1) {
reg = (S5P_VA_DMC1 + 0x30); reg = (S5P_VA_DMC1 + 0x30);
else } else {
printk(KERN_ERR "Cannot find DMC port\n"); printk(KERN_ERR "Cannot find DMC port\n");
return;
}
/* Find current DRAM frequency */ /* Find current DRAM frequency */
tmp = s5pv210_dram_conf[ch].freq; tmp = s5pv210_dram_conf[ch].freq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment