diff options
author | Darius Augulis <augulis.darius@gmail.com> | 2008-09-02 10:19:29 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2008-09-02 10:19:29 +0200 |
commit | c45e7d7be891fe94e13d0e7aeee3e0e4ee7118f4 (patch) | |
tree | b39151f5bb097dc419598569c2ffc93905784714 /drivers/serial/imx.c | |
parent | a9b0623357d2faa49a0f862154ba36c42c4bad2b (diff) |
i.MX serial: fix init failure
Adds extra "out" label to probe function after calling .init form platform data.
Because .init can return error number caused by gpio request fail.
Signed-off-by: Darius Augulis <augulis.darius@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/serial/imx.c')
-rw-r--r-- | drivers/serial/imx.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c index 6a29f9330a7..20189c447e9 100644 --- a/drivers/serial/imx.c +++ b/drivers/serial/imx.c @@ -1133,13 +1133,19 @@ static int serial_imx_probe(struct platform_device *pdev) if(pdata && (pdata->flags & IMXUART_HAVE_RTSCTS)) sport->have_rtscts = 1; - if (pdata->init) - pdata->init(pdev); + if (pdata->init) { + ret = pdata->init(pdev); + if (ret) + goto clkput; + } uart_add_one_port(&imx_reg, &sport->port); platform_set_drvdata(pdev, &sport->port); return 0; +clkput: + clk_put(sport->clk); + clk_disable(sport->clk); unmap: iounmap(sport->port.membase); free: |