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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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)
clk_put(s->clk);
out_free:
kfree(s);
-out:
return ret;
}