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

2014-09-24 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 1/2] tty: omap-serial: fix division by zero

2014-09-24 Thread Greg Kroah-Hartman
On Wed, Sep 24, 2014 at 09:55:21AM +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 1/2] tty: omap-serial: fix division by zero

2014-09-24 Thread Frans Klaver
On Wed, Sep 24, 2014 at 01:08:52AM -0700, Greg Kroah-Hartman wrote: On Wed, Sep 24, 2014 at 09:55:21AM +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

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

2014-09-24 Thread Frans Klaver
On Wed, Sep 24, 2014 at 10:41:11AM +0200, Frans Klaver wrote: On Wed, Sep 24, 2014 at 01:08:52AM -0700, Greg Kroah-Hartman wrote: On Wed, Sep 24, 2014 at 09:55:21AM +0200, Frans Klaver wrote: If the chosen baud rate is large enough (e.g. 3.5 megabaud), the calculated n values in