mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
clk: mmp: clk-of-pxa1928: Free memory obtained by kzalloc
Free memory, if init is not successful. Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
This commit is contained in:
parent
5785271ef2
commit
8daa528204
1 changed files with 3 additions and 0 deletions
|
|
@ -216,6 +216,7 @@ static void __init pxa1928_mpmu_clk_init(struct device_node *np)
|
|||
pxa_unit->mpmu_base = of_iomap(np, 0);
|
||||
if (!pxa_unit->mpmu_base) {
|
||||
pr_err("failed to map mpmu registers\n");
|
||||
kfree(pxa_unit);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -234,6 +235,7 @@ static void __init pxa1928_apmu_clk_init(struct device_node *np)
|
|||
pxa_unit->apmu_base = of_iomap(np, 0);
|
||||
if (!pxa_unit->apmu_base) {
|
||||
pr_err("failed to map apmu registers\n");
|
||||
kfree(pxa_unit);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -254,6 +256,7 @@ static void __init pxa1928_apbc_clk_init(struct device_node *np)
|
|||
pxa_unit->apbc_base = of_iomap(np, 0);
|
||||
if (!pxa_unit->apbc_base) {
|
||||
pr_err("failed to map apbc registers\n");
|
||||
kfree(pxa_unit);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue