Commit 5d7519df authored by Fabio Estevam's avatar Fabio Estevam Committed by Greg Kroah-Hartman

serial: mxs-auart: Disable clock on error path

We should disable the previously acquired clock when enabling s->clk
fails.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8b2303de
...@@ -1543,10 +1543,14 @@ static int mxs_get_clks(struct mxs_auart_port *s, ...@@ -1543,10 +1543,14 @@ static int mxs_get_clks(struct mxs_auart_port *s,
err = clk_prepare_enable(s->clk); err = clk_prepare_enable(s->clk);
if (err) { if (err) {
dev_err(s->dev, "Failed to enable clk!\n"); dev_err(s->dev, "Failed to enable clk!\n");
return err; goto disable_clk_ahb;
} }
return 0; return 0;
disable_clk_ahb:
clk_disable_unprepare(s->clk_ahb);
return err;
} }
/* /*
......
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