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

clk: st: clk-flexgen: Unmap region obtained by of_iomap

Free memory mapping, if probe is not successful.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>

authored by

Arvind Yadav and committed by
Stephen Boyd
16cd7764 113ff9c9

+4 -1
+4 -1
drivers/clk/st/clk-flexgen.c
··· 329 329 return; 330 330 331 331 parents = flexgen_get_parents(np, &num_parents); 332 - if (!parents) 332 + if (!parents) { 333 + iounmap(reg); 333 334 return; 335 + } 334 336 335 337 match = of_match_node(flexgen_of_match, np); 336 338 if (match) { ··· 396 394 return; 397 395 398 396 err: 397 + iounmap(reg); 399 398 if (clk_data) 400 399 kfree(clk_data->clks); 401 400 kfree(clk_data);