aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/ioc3_serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/ioc3_serial.c')
-rw-r--r--drivers/serial/ioc3_serial.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/serial/ioc3_serial.c b/drivers/serial/ioc3_serial.c
index 93de907b1208..ee43efc7bdcc 100644
--- a/drivers/serial/ioc3_serial.c
+++ b/drivers/serial/ioc3_serial.c
@@ -2017,6 +2017,7 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd)
2017 struct ioc3_port *port; 2017 struct ioc3_port *port;
2018 struct ioc3_port *ports[PORTS_PER_CARD]; 2018 struct ioc3_port *ports[PORTS_PER_CARD];
2019 int phys_port; 2019 int phys_port;
2020 int cnt;
2020 2021
2021 DPRINT_CONFIG(("%s (0x%p, 0x%p)\n", __func__, is, idd)); 2022 DPRINT_CONFIG(("%s (0x%p, 0x%p)\n", __func__, is, idd));
2022 2023
@@ -2044,6 +2045,7 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd)
2044 if (!port) { 2045 if (!port) {
2045 printk(KERN_WARNING 2046 printk(KERN_WARNING
2046 "IOC3 serial memory not available for port\n"); 2047 "IOC3 serial memory not available for port\n");
2048 ret = -ENOMEM;
2047 goto out4; 2049 goto out4;
2048 } 2050 }
2049 spin_lock_init(&port->ip_lock); 2051 spin_lock_init(&port->ip_lock);
@@ -2146,6 +2148,9 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd)
2146 2148
2147 /* error exits that give back resources */ 2149 /* error exits that give back resources */
2148out4: 2150out4:
2151 for (cnt = 0; cnt < phys_port; cnt++)
2152 kfree(ports[cnt]);
2153
2149 kfree(card_ptr); 2154 kfree(card_ptr);
2150 return ret; 2155 return ret;
2151} 2156}