mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-08 05:24:32 -05:00
sh: clock div4 frequency table offset fix
This patch fixes the per clock offset calculation in sh_clk_div4_register(). Without this patch the offset to the frequency table for each clock is incorrect. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
@@ -71,8 +71,9 @@ int __init sh_clk_div4_register(struct clk *clks, int nr,
|
||||
int ret = 0;
|
||||
int k;
|
||||
|
||||
k = nr_divs + 1;
|
||||
freq_table = alloc_bootmem(freq_table_size * nr * (nr_divs + 1));
|
||||
freq_table_size *= (nr_divs + 1);
|
||||
|
||||
freq_table = alloc_bootmem(freq_table_size * nr);
|
||||
if (!freq_table)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user