diff options
-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 6a29f9330a73..20189c447e92 100644 --- a/drivers/serial/imx.c +++ b/drivers/serial/imx.c | |||
@@ -1133,13 +1133,19 @@ static int serial_imx_probe(struct platform_device *pdev) | |||
1133 | if(pdata && (pdata->flags & IMXUART_HAVE_RTSCTS)) | 1133 | if(pdata && (pdata->flags & IMXUART_HAVE_RTSCTS)) |
1134 | sport->have_rtscts = 1; | 1134 | sport->have_rtscts = 1; |
1135 | 1135 | ||
1136 | if (pdata->init) | 1136 | if (pdata->init) { |
1137 | pdata->init(pdev); | 1137 | ret = pdata->init(pdev); |
1138 | if (ret) | ||
1139 | goto clkput; | ||
1140 | } | ||
1138 | 1141 | ||
1139 | uart_add_one_port(&imx_reg, &sport->port); | 1142 | uart_add_one_port(&imx_reg, &sport->port); |
1140 | platform_set_drvdata(pdev, &sport->port); | 1143 | platform_set_drvdata(pdev, &sport->port); |
1141 | 1144 | ||
1142 | return 0; | 1145 | return 0; |
1146 | clkput: | ||
1147 | clk_put(sport->clk); | ||
1148 | clk_disable(sport->clk); | ||
1143 | unmap: | 1149 | unmap: |
1144 | iounmap(sport->port.membase); | 1150 | iounmap(sport->port.membase); |
1145 | free: | 1151 | free: |