Commit cb6cfe2e authored by Markus Elfring's avatar Markus Elfring Committed by Tony Lindgren

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 020003f7
......@@ -1778,9 +1778,8 @@ static int sysc_child_add_named_clock(struct sysc *ddata,
clk = clk_get(child, name);
if (!IS_ERR(clk)) {
clk_put(clk);
return -EEXIST;
error = -EEXIST;
goto put_clk;
}
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));
if (!l)
error = -ENOMEM;
put_clk:
clk_put(clk);
return error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment