diff options
author | Tang Bin <tangbin@cmss.chinamobile.com> | 2021-08-23 13:07:54 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-08-26 14:51:04 +0200 |
commit | fa934fc1a8679f0704dddaefb6946c3da26c58a5 (patch) | |
tree | aef3e7e8f61e1401a7fc83fc0033d23c3826f11c /drivers/tty | |
parent | tty: serial: fsl_lpuart: do software reset for imx7ulp and imx8qxp (diff) | |
download | linux-fa934fc1a8679f0704dddaefb6946c3da26c58a5.tar.xz linux-fa934fc1a8679f0704dddaefb6946c3da26c58a5.zip |
tty: serial: linflexuart: Remove redundant check to simplify the code
In the function uart_add_one_port(), it can return zero or non-zero,
so remove redundant check to simplify the code.
Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://lore.kernel.org/r/20210823110754.11232-1-tangbin@cmss.chinamobile.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/fsl_linflexuart.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/tty/serial/fsl_linflexuart.c b/drivers/tty/serial/fsl_linflexuart.c index d87048073abe..283757264608 100644 --- a/drivers/tty/serial/fsl_linflexuart.c +++ b/drivers/tty/serial/fsl_linflexuart.c @@ -861,11 +861,7 @@ static int linflex_probe(struct platform_device *pdev) platform_set_drvdata(pdev, sport); - ret = uart_add_one_port(&linflex_reg, sport); - if (ret) - return ret; - - return 0; + return uart_add_one_port(&linflex_reg, sport); } static int linflex_remove(struct platform_device *pdev) |