Skip to content

Commit

Permalink
serial: amba-pl011: Remove redundant label
Browse files Browse the repository at this point in the history
The label 'out' is only used to return the error code. We can return the
error code directly and remove 'out' label.

Signed-off-by: Tushar Behera <tushar.b@samsung.com>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Tushar Behera authored and Greg Kroah-Hartman committed Jul 10, 2014
1 parent 8ad711a commit 7f6d942
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions drivers/tty/serial/amba-pl011.c
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,7 @@ static int pl011_hwinit(struct uart_port *port)
*/
retval = clk_prepare_enable(uap->clk);
if (retval)
goto out;
return retval;

uap->port.uartclk = clk_get_rate(uap->clk);

Expand All @@ -1507,8 +1507,6 @@ static int pl011_hwinit(struct uart_port *port)
plat->init();
}
return 0;
out:
return retval;
}

static void pl011_write_lcr_h(struct uart_amba_port *uap, unsigned int lcr_h)
Expand Down Expand Up @@ -2131,32 +2129,24 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
if (amba_ports[i] == NULL)
break;

if (i == ARRAY_SIZE(amba_ports)) {
ret = -EBUSY;
goto out;
}
if (i == ARRAY_SIZE(amba_ports))
return -EBUSY;

uap = devm_kzalloc(&dev->dev, sizeof(struct uart_amba_port),
GFP_KERNEL);
if (uap == NULL) {
ret = -ENOMEM;
goto out;
}
if (uap == NULL)
return -ENOMEM;

i = pl011_probe_dt_alias(i, &dev->dev);

base = devm_ioremap(&dev->dev, dev->res.start,
resource_size(&dev->res));
if (!base) {
ret = -ENOMEM;
goto out;
}
if (!base)
return -ENOMEM;

uap->clk = devm_clk_get(&dev->dev, NULL);
if (IS_ERR(uap->clk)) {
ret = PTR_ERR(uap->clk);
goto out;
}
if (IS_ERR(uap->clk))
return PTR_ERR(uap->clk);

uap->vendor = vendor;
uap->lcrh_rx = vendor->lcrh_rx;
Expand Down Expand Up @@ -2198,7 +2188,7 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
uart_unregister_driver(&amba_reg);
pl011_dma_remove(uap);
}
out:

return ret;
}

Expand Down

0 comments on commit 7f6d942

Please sign in to comment.