serial: 8250_dw: Honor clk_round_rate errors in
From: Heiko Stuebner <heiko@...> Date: Tue, 28 Feb 2017 04:09:22 +0100
Commit-Message
clk_round_rate returns a signed long and may possibly return errors in it, for example if there is no possible rate. Till now dw8250_set_termios ignored any error, the signednes and would just use the value as input to clk_set_rate. This of course falls apart if there is an actual error, so check for errors and only try to set a rate if the value is actually valid. Signed-off-by: Heiko Stuebner <heiko@...>
Patch-Comment
drivers/tty/serial/8250/8250_dw.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Statistics
- 5 lines added
- 2 lines removed