mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-05-12 18:23:45 +00: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
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue