mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 17:12:06 +00:00
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>
This commit is contained in:
parent
bd5305dcab
commit
fa934fc1a8
@ -861,11 +861,7 @@ static int linflex_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
platform_set_drvdata(pdev, sport);
|
platform_set_drvdata(pdev, sport);
|
||||||
|
|
||||||
ret = uart_add_one_port(&linflex_reg, sport);
|
return uart_add_one_port(&linflex_reg, sport);
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int linflex_remove(struct platform_device *pdev)
|
static int linflex_remove(struct platform_device *pdev)
|
||||||
|
Loading…
Reference in New Issue
Block a user