Skip to content

Commit

Permalink
tty: serial: linflexuart: Remove redundant check to simplify the code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tang Bin authored and Greg Kroah-Hartman committed Aug 26, 2021
1 parent bd5305d commit fa934fc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/tty/serial/fsl_linflexuart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit fa934fc

Please sign in to comment.