* Re: [PATCH -next] serial: 8250_uniphier: fix error return code in uniphier_uart_probe()
2018-01-04 7:42 [PATCH -next] serial: 8250_uniphier: fix error return code in uniphier_uart_probe() Wei Yongjun
@ 2018-01-04 7:41 ` Masahiro Yamada
0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2018-01-04 7:41 UTC (permalink / raw)
To: Wei Yongjun
Cc: Greg Kroah-Hartman, linux-arm-kernel, linux-serial, Jiri Slaby
2018-01-04 16:42 GMT+09:00 Wei Yongjun <weiyongjun1@huawei.com>:
> Fix to return a negative error code from the port register error
> handling case instead of 0, as done elsewhere in this function.
>
> Fixes: 39be40ce066d ("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>
Thanks!
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH -next] serial: 8250_uniphier: fix error return code in uniphier_uart_probe()
@ 2018-01-04 7:42 Wei Yongjun
2018-01-04 7:41 ` Masahiro Yamada
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2018-01-04 7:42 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby, Masahiro Yamada
Cc: Wei Yongjun, linux-arm-kernel, linux-serial
Fix to return a negative error code from the port register error
handling case instead of 0, as done elsewhere in this function.
Fixes: 39be40ce066d ("serial: 8250_uniphier: fix serial port index in private data")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/tty/serial/8250/8250_uniphier.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_uniphier.c b/drivers/tty/serial/8250/8250_uniphier.c
index 45ef506..28d88ccf 100644
--- a/drivers/tty/serial/8250/8250_uniphier.c
+++ b/drivers/tty/serial/8250/8250_uniphier.c
@@ -250,12 +250,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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-04 7:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-04 7:42 [PATCH -next] serial: 8250_uniphier: fix error return code in uniphier_uart_probe() Wei Yongjun
2018-01-04 7:41 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).