Commit 86371d07 authored by Sascha Hauer's avatar Sascha Hauer Committed by Russell King

[ARM] 2957/1: imx UART Error handling

Patch from Sascha Hauer

Fix error path in imx_startup.
Signed-off-by: default avatarGiancarlo Formicuccia <gformicuccia@atinno.com>
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent ce80cc14
...@@ -383,11 +383,11 @@ static int imx_startup(struct uart_port *port) ...@@ -383,11 +383,11 @@ static int imx_startup(struct uart_port *port)
*/ */
retval = request_irq(sport->rxirq, imx_rxint, 0, retval = request_irq(sport->rxirq, imx_rxint, 0,
DRIVER_NAME, sport); DRIVER_NAME, sport);
if (retval) goto error_out2; if (retval) goto error_out1;
retval = request_irq(sport->txirq, imx_txint, 0, retval = request_irq(sport->txirq, imx_txint, 0,
"imx-uart", sport); "imx-uart", sport);
if (retval) goto error_out1; if (retval) goto error_out2;
/* /*
* Finally, clear and enable interrupts * Finally, clear and enable interrupts
...@@ -406,10 +406,9 @@ static int imx_startup(struct uart_port *port) ...@@ -406,10 +406,9 @@ static int imx_startup(struct uart_port *port)
return 0; return 0;
error_out1:
free_irq(sport->rxirq, sport);
error_out2: error_out2:
free_irq(sport->txirq, sport); free_irq(sport->rxirq, sport);
error_out1:
return retval; return retval;
} }
......
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