@@ -1698,29 +1698,29 @@ static int mxs_auart_probe(struct platform_device *pdev)
1698
1698
irq = platform_get_irq (pdev , 0 );
1699
1699
if (irq < 0 ) {
1700
1700
ret = irq ;
1701
- goto out_disable_clks ;
1701
+ goto out_iounmap ;
1702
1702
}
1703
1703
1704
1704
s -> port .irq = irq ;
1705
1705
ret = devm_request_irq (& pdev -> dev , irq , mxs_auart_irq_handle , 0 ,
1706
1706
dev_name (& pdev -> dev ), s );
1707
1707
if (ret )
1708
- goto out_disable_clks ;
1708
+ goto out_iounmap ;
1709
1709
1710
1710
platform_set_drvdata (pdev , s );
1711
1711
1712
1712
ret = mxs_auart_init_gpios (s , & pdev -> dev );
1713
1713
if (ret ) {
1714
1714
dev_err (& pdev -> dev , "Failed to initialize GPIOs.\n" );
1715
- goto out_disable_clks ;
1715
+ goto out_iounmap ;
1716
1716
}
1717
1717
1718
1718
/*
1719
1719
* Get the GPIO lines IRQ
1720
1720
*/
1721
1721
ret = mxs_auart_request_gpio_irq (s );
1722
1722
if (ret )
1723
- goto out_disable_clks ;
1723
+ goto out_iounmap ;
1724
1724
1725
1725
auart_port [s -> port .line ] = s ;
1726
1726
@@ -1746,6 +1746,9 @@ static int mxs_auart_probe(struct platform_device *pdev)
1746
1746
mxs_auart_free_gpio_irq (s );
1747
1747
auart_port [pdev -> id ] = NULL ;
1748
1748
1749
+ out_iounmap :
1750
+ iounmap (s -> port .membase );
1751
+
1749
1752
out_disable_clks :
1750
1753
if (is_asm9260_auart (s )) {
1751
1754
clk_disable_unprepare (s -> clk );
@@ -1761,6 +1764,7 @@ static int mxs_auart_remove(struct platform_device *pdev)
1761
1764
uart_remove_one_port (& auart_driver , & s -> port );
1762
1765
auart_port [pdev -> id ] = NULL ;
1763
1766
mxs_auart_free_gpio_irq (s );
1767
+ iounmap (s -> port .membase );
1764
1768
if (is_asm9260_auart (s )) {
1765
1769
clk_disable_unprepare (s -> clk );
1766
1770
clk_disable_unprepare (s -> clk_ahb );
0 commit comments