Skip to content

Commit fa934fc

Browse files
Tang Bingregkh
authored andcommitted
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 <[email protected]> Signed-off-by: Tang Bin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent bd5305d commit fa934fc

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/tty/serial/fsl_linflexuart.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -861,11 +861,7 @@ static int linflex_probe(struct platform_device *pdev)
861861

862862
platform_set_drvdata(pdev, sport);
863863

864-
ret = uart_add_one_port(&linflex_reg, sport);
865-
if (ret)
866-
return ret;
867-
868-
return 0;
864+
return uart_add_one_port(&linflex_reg, sport);
869865
}
870866

871867
static int linflex_remove(struct platform_device *pdev)

0 commit comments

Comments
 (0)