From: Fabio Estevam Date: Thu, 27 Nov 2014 19:08:30 +0000 (-0200) Subject: serial: mxs-auart: Remove unneeded goto label X-Git-Tag: v5.15~16323^2~112 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=11387b0a46a4b19f3aa8c7b85faff31d9bc1e471;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index ec553f8..a9e7fa6 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; }