aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/imx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index e6c2ba26dcbb..cbd4f3224643 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -1157,10 +1157,15 @@ static int serial_imx_probe(struct platform_device *pdev)
1157 goto clkput; 1157 goto clkput;
1158 } 1158 }
1159 1159
1160 uart_add_one_port(&imx_reg, &sport->port); 1160 ret = uart_add_one_port(&imx_reg, &sport->port);
1161 if (ret)
1162 goto deinit;
1161 platform_set_drvdata(pdev, &sport->port); 1163 platform_set_drvdata(pdev, &sport->port);
1162 1164
1163 return 0; 1165 return 0;
1166deinit:
1167 if (pdata->exit)
1168 pdata->exit(pdev);
1164clkput: 1169clkput:
1165 clk_put(sport->clk); 1170 clk_put(sport->clk);
1166 clk_disable(sport->clk); 1171 clk_disable(sport->clk);