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>
This commit is contained in:
parent
3e29af27c4
commit
11387b0a46
1 changed files with 2 additions and 5 deletions
|
@ -1232,10 +1232,8 @@ static int mxs_auart_probe(struct platform_device *pdev)
|
||||||
struct resource *r;
|
struct resource *r;
|
||||||
|
|
||||||
s = kzalloc(sizeof(struct mxs_auart_port), GFP_KERNEL);
|
s = kzalloc(sizeof(struct mxs_auart_port), GFP_KERNEL);
|
||||||
if (!s) {
|
if (!s)
|
||||||
ret = -ENOMEM;
|
return -ENOMEM;
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = serial_mxs_probe_dt(s, pdev);
|
ret = serial_mxs_probe_dt(s, pdev);
|
||||||
if (ret > 0)
|
if (ret > 0)
|
||||||
|
@ -1314,7 +1312,6 @@ out_free_clk:
|
||||||
clk_put(s->clk);
|
clk_put(s->clk);
|
||||||
out_free:
|
out_free:
|
||||||
kfree(s);
|
kfree(s);
|
||||||
out:
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue