serial: imx: Remove unneeded goto label
Instead of jumping to 'error_out1' label we can simplify the code and return the error code directly. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c0d1c6b0f0
commit
cb0f0a5ff4
|
@ -1076,11 +1076,11 @@ static int imx_startup(struct uart_port *port)
|
||||||
|
|
||||||
retval = clk_prepare_enable(sport->clk_per);
|
retval = clk_prepare_enable(sport->clk_per);
|
||||||
if (retval)
|
if (retval)
|
||||||
goto error_out1;
|
return retval;
|
||||||
retval = clk_prepare_enable(sport->clk_ipg);
|
retval = clk_prepare_enable(sport->clk_ipg);
|
||||||
if (retval) {
|
if (retval) {
|
||||||
clk_disable_unprepare(sport->clk_per);
|
clk_disable_unprepare(sport->clk_per);
|
||||||
goto error_out1;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
imx_setup_ufcr(sport, 0);
|
imx_setup_ufcr(sport, 0);
|
||||||
|
@ -1170,9 +1170,6 @@ static int imx_startup(struct uart_port *port)
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error_out1:
|
|
||||||
return retval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void imx_shutdown(struct uart_port *port)
|
static void imx_shutdown(struct uart_port *port)
|
||||||
|
|
Loading…
Reference in New Issue