[PATCH resend 1/2] tty: omap-serial: fix division by zero

2014-09-25 Thread Frans Klaver
If the chosen baud rate is large enough (e.g. 3.5 megabaud), the calculated n values in serial_omap_is_baud_mode16() may become 0. This causes a division by zero when calculating the difference between calculated and desired baud rates. To prevent this, cap the n13 and n16 values on 1. Division

Re: [PATCH resend 1/2] tty: omap-serial: fix division by zero

2014-09-25 Thread Greg Kroah-Hartman
On Thu, Sep 25, 2014 at 11:19:51AM +0200, Frans Klaver wrote: If the chosen baud rate is large enough (e.g. 3.5 megabaud), the calculated n values in serial_omap_is_baud_mode16() may become 0. This causes a division by zero when calculating the difference between calculated and desired baud

Re: [PATCH resend 1/2] tty: omap-serial: fix division by zero

2014-09-25 Thread Frans Klaver
On Thu, Sep 25, 2014 at 12:16:28PM +0200, Greg Kroah-Hartman wrote: On Thu, Sep 25, 2014 at 11:19:51AM +0200, Frans Klaver wrote: If the chosen baud rate is large enough (e.g. 3.5 megabaud), the calculated n values in serial_omap_is_baud_mode16() may become 0. This causes a division by zero