aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRahul Ruikar <rahul.ruikar@gmail.com>2010-10-01 16:32:45 -0400
committerTony Luck <tony.luck@intel.com>2010-10-01 16:32:45 -0400
commit35ed16740c564ff092fe45804dfbbb1449f2bd7e (patch)
tree448962071cddcc52a69f00f10d92362c374b24bf
parentdf0a59a14c693647da4097ba3578c524c452fd0d (diff)
[IA64] ioc3_serial: release resources in error return path
In ioc3uart_probe() resources were not released during error return path - ports[phys_port] Signed-off-by: Rahul Ruikar <rahul.ruikar@gmail.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
-rw-r--r--drivers/serial/ioc3_serial.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/serial/ioc3_serial.c b/drivers/serial/ioc3_serial.c
index 93de907b1208..08d77b041bd8 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
@@ -2146,6 +2147,9 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd)
2146 2147
2147 /* error exits that give back resources */ 2148 /* error exits that give back resources */
2148out4: 2149out4:
2150 for (cnt = 0; cnt < phys_port; cnt++)
2151 kfree(ports[cnt]);
2152
2149 kfree(card_ptr); 2153 kfree(card_ptr);
2150 return ret; 2154 return ret;
2151} 2155}