Re: [PATCH V1 1/1] serial: 8250_fintek: Fix crash with baud rate B0

From: Alan Cox
Date: Wed Nov 08 2017 - 12:34:29 EST


On Wed, 8 Nov 2017 11:05:46 +0800
"Ji-Ze Hong (Peter Hong)" <hpeter@xxxxxxxxx> wrote:

> The 8250_fintek.c is support the Fintek F81866/F81216 with dynamic clock.
> But It'll generate "division by zero" exception and crash in
> fintek_8250_set_termios() with baud rate 0 on baudrate_table[i] % baud.

0 means "hang up", so this looks good providing it leaves the device in a
sane state.


Reviewed-by: Alan Cox <alan@xxxxxxxxxxxxxxx>