summaryrefslogtreecommitdiffstats
path: root/net/batman-adv
diff options
context:
space:
mode:
authorMaxime COQUELIN <maxime.coquelin@st.com>2014-07-24 14:02:56 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-27 11:05:08 -0700
commit1d6ba284dff546baca58e78546da46be3b48462a (patch)
treeb2455df55830e09ef16570289e5bc741bfbf75cf /net/batman-adv
parent5b4e79ae452613a9d391cf1e5ab7e9a49241ad28 (diff)
downloadblackbird-op-linux-1d6ba284dff546baca58e78546da46be3b48462a.tar.gz
blackbird-op-linux-1d6ba284dff546baca58e78546da46be3b48462a.zip
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 <maxime.coquelin@st.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/batman-adv')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud