diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2014-11-27 14:08:30 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-09 17:12:27 -0500 |
commit | 11387b0a46a4b19f3aa8c7b85faff31d9bc1e471 (patch) | |
tree | e271b604643fd2271d70dade178ae118b485f431 /drivers/tty | |
parent | 3e29af27c4686d9cb401a63c7eeb6376662b13c1 (diff) |
serial: mxs-auart: Remove unneeded goto label
Instead of jumping to the 'out' label, let's return the error immediately, which
makes the code shorter and cleaner.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/mxs-auart.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index ec553f8eb218..a9e7fa68b75e 100644 --- a/drivers/tty/serial/mxs-auart.c +++ b/drivers/tty/serial/mxs-auart.c | |||
@@ -1232,10 +1232,8 @@ static int mxs_auart_probe(struct platform_device *pdev) | |||
1232 | struct resource *r; | 1232 | struct resource *r; |
1233 | 1233 | ||
1234 | s = kzalloc(sizeof(struct mxs_auart_port), GFP_KERNEL); | 1234 | s = kzalloc(sizeof(struct mxs_auart_port), GFP_KERNEL); |
1235 | if (!s) { | 1235 | if (!s) |
1236 | ret = -ENOMEM; | 1236 | return -ENOMEM; |
1237 | goto out; | ||
1238 | } | ||
1239 | 1237 | ||
1240 | ret = serial_mxs_probe_dt(s, pdev); | 1238 | ret = serial_mxs_probe_dt(s, pdev); |
1241 | if (ret > 0) | 1239 | if (ret > 0) |
@@ -1314,7 +1312,6 @@ out_free_clk: | |||
1314 | clk_put(s->clk); | 1312 | clk_put(s->clk); |
1315 | out_free: | 1313 | out_free: |
1316 | kfree(s); | 1314 | kfree(s); |
1317 | out: | ||
1318 | return ret; | 1315 | return ret; |
1319 | } | 1316 | } |
1320 | 1317 | ||