Commit c45e7d7b authored by Darius Augulis's avatar Darius Augulis Committed by Sascha Hauer

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: default avatarDarius Augulis <augulis.darius@gmail.com>
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
parent a9b06233
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment