mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-01 08:04:22 +08:00
serial: mxs-auart: Disable clock on error path
We should disable the previously acquired clock when enabling s->clk fails. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8b2303de39
commit
5d7519dfc9
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user