Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11387b0a authored by Fabio Estevam's avatar Fabio Estevam Committed by Greg Kroah-Hartman
Browse files

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: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3e29af27
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -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 @@ static int mxs_auart_probe(struct platform_device *pdev)
	clk_put(s->clk);
out_free:
	kfree(s);
out:
	return ret;
}