aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/serial/mpsc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c
index 63d2a66e563b..704243c9f78a 100644
--- a/drivers/serial/mpsc.c
+++ b/drivers/serial/mpsc.c
@@ -1893,6 +1893,10 @@ mpsc_drv_map_regs(struct mpsc_port_info *pi, struct platform_device *pd)
1893 } 1893 }
1894 else { 1894 else {
1895 mpsc_resource_err("SDMA base"); 1895 mpsc_resource_err("SDMA base");
1896 if (pi->mpsc_base) {
1897 iounmap(pi->mpsc_base);
1898 pi->mpsc_base = NULL;
1899 }
1896 return -ENOMEM; 1900 return -ENOMEM;
1897 } 1901 }
1898 1902
@@ -1905,6 +1909,14 @@ mpsc_drv_map_regs(struct mpsc_port_info *pi, struct platform_device *pd)
1905 } 1909 }
1906 else { 1910 else {
1907 mpsc_resource_err("BRG base"); 1911 mpsc_resource_err("BRG base");
1912 if (pi->mpsc_base) {
1913 iounmap(pi->mpsc_base);
1914 pi->mpsc_base = NULL;
1915 }
1916 if (pi->sdma_base) {
1917 iounmap(pi->sdma_base);
1918 pi->sdma_base = NULL;
1919 }
1908 return -ENOMEM; 1920 return -ENOMEM;
1909 } 1921 }
1910 1922