diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2014-11-27 17:08:30 -0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-09 14:12:27 -0800 |
commit | 11387b0a46a4b19f3aa8c7b85faff31d9bc1e471 (patch) | |
tree | e271b604643fd2271d70dade178ae118b485f431 /drivers | |
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')
-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) struct resource *r; s = kzalloc(sizeof(struct mxs_auart_port), GFP_KERNEL); - if (!s) { - ret = -ENOMEM; - goto out; - } + if (!s) + return -ENOMEM; ret = serial_mxs_probe_dt(s, pdev); if (ret > 0) @@ -1314,7 +1312,6 @@ out_free_clk: clk_put(s->clk); out_free: kfree(s); -out: return ret; } |