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>
This commit is contained in:
parent
a9b0623357
commit
c45e7d7be8
@ -1133,13 +1133,19 @@ static int serial_imx_probe(struct platform_device *pdev)
|
|||||||
if(pdata && (pdata->flags & IMXUART_HAVE_RTSCTS))
|
if(pdata && (pdata->flags & IMXUART_HAVE_RTSCTS))
|
||||||
sport->have_rtscts = 1;
|
sport->have_rtscts = 1;
|
||||||
|
|
||||||
if (pdata->init)
|
if (pdata->init) {
|
||||||
pdata->init(pdev);
|
ret = pdata->init(pdev);
|
||||||
|
if (ret)
|
||||||
|
goto clkput;
|
||||||
|
}
|
||||||
|
|
||||||
uart_add_one_port(&imx_reg, &sport->port);
|
uart_add_one_port(&imx_reg, &sport->port);
|
||||||
platform_set_drvdata(pdev, &sport->port);
|
platform_set_drvdata(pdev, &sport->port);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
clkput:
|
||||||
|
clk_put(sport->clk);
|
||||||
|
clk_disable(sport->clk);
|
||||||
unmap:
|
unmap:
|
||||||
iounmap(sport->port.membase);
|
iounmap(sport->port.membase);
|
||||||
free:
|
free:
|
||||||
|
Loading…
Reference in New Issue
Block a user