Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'clk-next-shmobile' into clk-next

+8 -4
+8 -4
drivers/clk/shmobile/clk-mstp.c
··· 160 160 unsigned int i; 161 161 162 162 group = kzalloc(sizeof(*group), GFP_KERNEL); 163 - clks = kzalloc(MSTP_MAX_CLOCKS * sizeof(*clks), GFP_KERNEL); 163 + clks = kmalloc(MSTP_MAX_CLOCKS * sizeof(*clks), GFP_KERNEL); 164 164 if (group == NULL || clks == NULL) { 165 165 kfree(group); 166 166 kfree(clks); ··· 180 180 kfree(clks); 181 181 return; 182 182 } 183 + 184 + for (i = 0; i < MSTP_MAX_CLOCKS; ++i) 185 + clks[i] = ERR_PTR(-ENOENT); 183 186 184 187 for (i = 0; i < MSTP_MAX_CLOCKS; ++i) { 185 188 const char *parent_name; ··· 208 205 continue; 209 206 } 210 207 211 - clks[clkidx] = cpg_mstp_clock_register(name, parent_name, i, 212 - group); 208 + clks[clkidx] = cpg_mstp_clock_register(name, parent_name, 209 + clkidx, group); 213 210 if (!IS_ERR(clks[clkidx])) { 214 - group->data.clk_num = max(group->data.clk_num, clkidx); 211 + group->data.clk_num = max(group->data.clk_num, 212 + clkidx + 1); 215 213 /* 216 214 * Register a clkdev to let board code retrieve the 217 215 * clock by name and register aliases for non-DT