mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
serial: 8250_uniphier: fix error return code in uniphier_uart_probe()
commit7defa77d2bupstream. Fix to return a negative error code from the port register error handling case instead of 0, as done elsewhere in this function. Fixes:39be40ce06("serial: 8250_uniphier: fix serial port index in private data") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
aa33208b5a
commit
24293a3970
@@ -259,12 +259,13 @@ static int uniphier_uart_probe(struct platform_device *pdev)
|
||||
up.dl_read = uniphier_serial_dl_read;
|
||||
up.dl_write = uniphier_serial_dl_write;
|
||||
|
||||
priv->line = serial8250_register_8250_port(&up);
|
||||
if (priv->line < 0) {
|
||||
ret = serial8250_register_8250_port(&up);
|
||||
if (ret < 0) {
|
||||
dev_err(dev, "failed to register 8250 port\n");
|
||||
clk_disable_unprepare(priv->clk);
|
||||
return ret;
|
||||
}
|
||||
priv->line = ret;
|
||||
|
||||
platform_set_drvdata(pdev, priv);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user