summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-12-02 01:17:58 -0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-08 17:14:58 -0800
commit9bbc3dca9d2212f900396ab9642c48279657a8c0 (patch)
tree39490e44fb46380d78d13223a70640a800b59988 /drivers/tty
parent753023dcdd2da515f991aa0e6a65016713f0c24f (diff)
downloadop-kernel-dev-9bbc3dca9d2212f900396ab9642c48279657a8c0.zip
op-kernel-dev-9bbc3dca9d2212f900396ab9642c48279657a8c0.tar.gz
tty: serial: mxs-auart: Check the return value from clk_prepare_enable()
clk_prepare_enable() may fail, so let's check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/mxs-auart.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index d8b6fee..aa97fd8 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -734,9 +734,12 @@ static void mxs_auart_reset(struct uart_port *u)
static int mxs_auart_startup(struct uart_port *u)
{
+ int ret;
struct mxs_auart_port *s = to_auart_port(u);
- clk_prepare_enable(s->clk);
+ ret = clk_prepare_enable(s->clk);
+ if (ret)
+ return ret;
writel(AUART_CTRL0_CLKGATE, u->membase + AUART_CTRL0_CLR);
@@ -957,7 +960,9 @@ auart_console_setup(struct console *co, char *options)
if (!s)
return -ENODEV;
- clk_prepare_enable(s->clk);
+ ret = clk_prepare_enable(s->clk);
+ if (ret)
+ return ret;
if (options)
uart_parse_options(options, &baud, &parity, &bits, &flow);
OpenPOWER on IntegriCloud