Commit 7f6d942a authored by Tushar Behera's avatar Tushar Behera Committed by Greg Kroah-Hartman

serial: amba-pl011: Remove redundant label

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: default avatarTushar Behera <tushar.b@samsung.com>
Reviewed-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8ad711a9
...@@ -1484,7 +1484,7 @@ static int pl011_hwinit(struct uart_port *port) ...@@ -1484,7 +1484,7 @@ static int pl011_hwinit(struct uart_port *port)
*/ */
retval = clk_prepare_enable(uap->clk); retval = clk_prepare_enable(uap->clk);
if (retval) if (retval)
goto out; return retval;
uap->port.uartclk = clk_get_rate(uap->clk); uap->port.uartclk = clk_get_rate(uap->clk);
...@@ -1507,8 +1507,6 @@ static int pl011_hwinit(struct uart_port *port) ...@@ -1507,8 +1507,6 @@ static int pl011_hwinit(struct uart_port *port)
plat->init(); plat->init();
} }
return 0; return 0;
out:
return retval;
} }
static void pl011_write_lcr_h(struct uart_amba_port *uap, unsigned int lcr_h) static void pl011_write_lcr_h(struct uart_amba_port *uap, unsigned int lcr_h)
...@@ -2131,32 +2129,24 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id) ...@@ -2131,32 +2129,24 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
if (amba_ports[i] == NULL) if (amba_ports[i] == NULL)
break; break;
if (i == ARRAY_SIZE(amba_ports)) { if (i == ARRAY_SIZE(amba_ports))
ret = -EBUSY; return -EBUSY;
goto out;
}
uap = devm_kzalloc(&dev->dev, sizeof(struct uart_amba_port), uap = devm_kzalloc(&dev->dev, sizeof(struct uart_amba_port),
GFP_KERNEL); GFP_KERNEL);
if (uap == NULL) { if (uap == NULL)
ret = -ENOMEM; return -ENOMEM;
goto out;
}
i = pl011_probe_dt_alias(i, &dev->dev); i = pl011_probe_dt_alias(i, &dev->dev);
base = devm_ioremap(&dev->dev, dev->res.start, base = devm_ioremap(&dev->dev, dev->res.start,
resource_size(&dev->res)); resource_size(&dev->res));
if (!base) { if (!base)
ret = -ENOMEM; return -ENOMEM;
goto out;
}
uap->clk = devm_clk_get(&dev->dev, NULL); uap->clk = devm_clk_get(&dev->dev, NULL);
if (IS_ERR(uap->clk)) { if (IS_ERR(uap->clk))
ret = PTR_ERR(uap->clk); return PTR_ERR(uap->clk);
goto out;
}
uap->vendor = vendor; uap->vendor = vendor;
uap->lcrh_rx = vendor->lcrh_rx; uap->lcrh_rx = vendor->lcrh_rx;
...@@ -2198,7 +2188,7 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id) ...@@ -2198,7 +2188,7 @@ static int pl011_probe(struct amba_device *dev, const struct amba_id *id)
uart_unregister_driver(&amba_reg); uart_unregister_driver(&amba_reg);
pl011_dma_remove(uap); pl011_dma_remove(uap);
} }
out:
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment