Skip to content

Commit

Permalink
[ARM] 2957/1: imx UART Error handling
Browse files Browse the repository at this point in the history
Patch from Sascha Hauer

Fix error path in imx_startup.

Signed-off-by: Giancarlo Formicuccia <gformicuccia@atinno.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Sascha Hauer authored and Russell King committed Oct 10, 2005
1 parent ce80cc1 commit 86371d0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/serial/imx.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,11 +383,11 @@ static int imx_startup(struct uart_port *port)
*/
retval = request_irq(sport->rxirq, imx_rxint, 0,
DRIVER_NAME, sport);
if (retval) goto error_out2;
if (retval) goto error_out1;

retval = request_irq(sport->txirq, imx_txint, 0,
"imx-uart", sport);
if (retval) goto error_out1;
if (retval) goto error_out2;

/*
* Finally, clear and enable interrupts
Expand All @@ -406,10 +406,9 @@ static int imx_startup(struct uart_port *port)

return 0;

error_out1:
free_irq(sport->rxirq, sport);
error_out2:
free_irq(sport->txirq, sport);
free_irq(sport->rxirq, sport);
error_out1:
return retval;
}

Expand Down

0 comments on commit 86371d0

Please sign in to comment.