Skip to content

Commit

Permalink
ARM: S5PV210: Fix possible null pointer dereference
Browse files Browse the repository at this point in the history
Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
  • Loading branch information
Jonghwan Choi authored and Kukjin Kim committed Jun 1, 2011
1 parent 55922c9 commit d62fa31
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions arch/arm/mach-s5pv210/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,14 @@ static void s5pv210_set_refresh(enum s5pv210_dmc_port ch, unsigned long freq)
unsigned long tmp, tmp1;
void __iomem *reg = NULL;

if (ch == DMC0)
if (ch == DMC0) {
reg = (S5P_VA_DMC0 + 0x30);
else if (ch == DMC1)
} else if (ch == DMC1) {
reg = (S5P_VA_DMC1 + 0x30);
else
} else {
printk(KERN_ERR "Cannot find DMC port\n");
return;
}

/* Find current DRAM frequency */
tmp = s5pv210_dram_conf[ch].freq;
Expand Down

0 comments on commit d62fa31

Please sign in to comment.