projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b2303d
)
serial: mxs-auart: Disable clock on error path
author
Fabio Estevam
<fabio.estevam@nxp.com>
Fri, 9 Sep 2016 11:31:33 +0000
(08:31 -0300)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Tue, 13 Sep 2016 16:54:34 +0000
(18:54 +0200)
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>
drivers/tty/serial/mxs-auart.c
patch
|
blob
|
history
diff --git
a/drivers/tty/serial/mxs-auart.c
b/drivers/tty/serial/mxs-auart.c
index
2f04ec2
..
680270b
100644
(file)
--- a/
drivers/tty/serial/mxs-auart.c
+++ b/
drivers/tty/serial/mxs-auart.c
@@
-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;
}
/*