mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-27 08:14:35 +08:00
bus: ti-sysc: Adjust exception handling in sysc_child_add_named_clock()
Add a jump target so that a call of the function “clk_put” can be better reused at the end of this function. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Tony Lindgren <tony@atomide.com>
This commit is contained in:
parent
020003f763
commit
cb6cfe2eae
@ -1778,9 +1778,8 @@ static int sysc_child_add_named_clock(struct sysc *ddata,
|
|||||||
|
|
||||||
clk = clk_get(child, name);
|
clk = clk_get(child, name);
|
||||||
if (!IS_ERR(clk)) {
|
if (!IS_ERR(clk)) {
|
||||||
clk_put(clk);
|
error = -EEXIST;
|
||||||
|
goto put_clk;
|
||||||
return -EEXIST;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clk = clk_get(ddata->dev, name);
|
clk = clk_get(ddata->dev, name);
|
||||||
@ -1790,7 +1789,7 @@ static int sysc_child_add_named_clock(struct sysc *ddata,
|
|||||||
l = clkdev_create(clk, name, dev_name(child));
|
l = clkdev_create(clk, name, dev_name(child));
|
||||||
if (!l)
|
if (!l)
|
||||||
error = -ENOMEM;
|
error = -ENOMEM;
|
||||||
|
put_clk:
|
||||||
clk_put(clk);
|
clk_put(clk);
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
|
Loading…
Reference in New Issue
Block a user