From: Stephen Boyd Date: Thu, 4 Jan 2018 00:44:37 +0000 (-0800) Subject: clk: Simplify debugfs registration X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=db3188fadfe6af73d2485131a6975c032306e1ea;p=linux.git clk: Simplify debugfs registration We don't need a goto here. Drop it. Signed-off-by: Stephen Boyd --- diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index c8ea2dd32251d..0a52357ded5c1 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -2723,12 +2723,8 @@ static int clk_debug_register(struct clk_core *core) mutex_lock(&clk_debug_lock); hlist_add_head(&core->debug_node, &clk_debug_list); - - if (!inited) - goto unlock; - - ret = clk_debug_create_one(core, rootdir); -unlock: + if (inited) + ret = clk_debug_create_one(core, rootdir); mutex_unlock(&clk_debug_lock); return ret;