提交 5d7519df 编写于 作者: F Fabio Estevam 提交者: 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: NFabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 8b2303de
......@@ -1543,10 +1543,14 @@ static int mxs_get_clks(struct mxs_auart_port *s,
err = clk_prepare_enable(s->clk);
if (err) {
dev_err(s->dev, "Failed to enable clk!\n");
return err;
goto disable_clk_ahb;
}
return 0;
disable_clk_ahb:
clk_disable_unprepare(s->clk_ahb);
return err;
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册