From: Maxime COQUELIN Date: Thu, 24 Jul 2014 12:02:56 +0000 (+0200) Subject: serial: st-asc: Fix overflow in baudrate calculation X-Git-Tag: omap-for-v3.17/fixes-against-rc2~165^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d6ba284dff546baca58e78546da46be3b48462a;p=pandora-kernel.git serial: st-asc: Fix overflow in baudrate calculation In the current calculation, if the required baud rate is above 262143, we get an overflow. This patch uses a 64bits variable to do the maths. Also, we remove the '+1' to avoid a divide by zero if the input clock rate is something unexpected. Indeed, if the input clock rate is zero, it is preferable to be notified, since the UART won't work anyway. Signed-off-by: Maxime Coquelin Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed