Commit 35ed1674 authored by Rahul Ruikar's avatar Rahul Ruikar Committed by Tony Luck

[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: default avatarRahul Ruikar <rahul.ruikar@gmail.com>
Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
parent df0a59a1
...@@ -2017,6 +2017,7 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd) ...@@ -2017,6 +2017,7 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd)
struct ioc3_port *port; struct ioc3_port *port;
struct ioc3_port *ports[PORTS_PER_CARD]; struct ioc3_port *ports[PORTS_PER_CARD];
int phys_port; int phys_port;
int cnt;
DPRINT_CONFIG(("%s (0x%p, 0x%p)\n", __func__, is, idd)); DPRINT_CONFIG(("%s (0x%p, 0x%p)\n", __func__, is, idd));
...@@ -2146,6 +2147,9 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd) ...@@ -2146,6 +2147,9 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd)
/* error exits that give back resources */ /* error exits that give back resources */
out4: out4:
for (cnt = 0; cnt < phys_port; cnt++)
kfree(ports[cnt]);
kfree(card_ptr); kfree(card_ptr);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment