Skip to content

Commit

Permalink
[IA64] ioc3_serial: release resources in error return path
Browse files Browse the repository at this point in the history
In ioc3uart_probe()
resources were not released during error return path
- ports[phys_port]

Signed-off-by: Rahul Ruikar <[email protected]>
Signed-off-by: Tony Luck <[email protected]>
  • Loading branch information
rahulruikar authored and aegl committed Oct 1, 2010
1 parent df0a59a commit 35ed167
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/serial/ioc3_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -2017,6 +2017,7 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd)
struct ioc3_port *port;
struct ioc3_port *ports[PORTS_PER_CARD];
int phys_port;
int cnt;

DPRINT_CONFIG(("%s (0x%p, 0x%p)\n", __func__, is, idd));

Expand Down Expand Up @@ -2146,6 +2147,9 @@ ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd)

/* error exits that give back resources */
out4:
for (cnt = 0; cnt < phys_port; cnt++)
kfree(ports[cnt]);

kfree(card_ptr);
return ret;
}
Expand Down

0 comments on commit 35ed167

Please sign in to comment.