]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: at91: Fix division by zero in PLL recalc_rate()
authorRonald Wahl <rwahl@gmx.de>
Wed, 10 Oct 2018 13:54:54 +0000 (15:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Nov 2018 08:22:03 +0000 (09:22 +0100)
commit3a6f7116bf575da89a630a45ef9b2591d0b65a0b
tree0e6deb285d1b4636968d5a9cd46cec6932e42d36
parentb4972d19dbf84eba123a4fcc3c56afb76a123adb
clk: at91: Fix division by zero in PLL recalc_rate()

commit 0f5cb0e6225cae2f029944cb8c74617aab6ddd49 upstream.

Commit a982e45dc150 ("clk: at91: PLL recalc_rate() now using cached MUL
and DIV values") removed a check that prevents a division by zero. This
now causes a stacktrace when booting the kernel on a at91 platform if
the PLL DIV register contains zero. This commit reintroduces this check.

Fixes: a982e45dc150 ("clk: at91: PLL recalc_rate() now using cached...")
Cc: <stable@vger.kernel.org>
Signed-off-by: Ronald Wahl <rwahl@gmx.de>
Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/at91/clk-pll.c