diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2015-03-29 03:48:48 +0200 |
---|---|---|
committer | Klaus Goger <klaus.goger@theobroma-systems.com> | 2015-07-30 18:52:58 +0200 |
commit | 054900cbf1ae80cea79f4c817a51cf39e42eade3 (patch) | |
tree | 31ee3a8f20a6bdc03db55e7d6002585db8e059dc /arch/arm/boot | |
parent | 836ccda884608f91b4ff57afb3ff2359911343dd (diff) |
clk: check ->determine/round_rate() return value in clk_calc_new_rates
->determine_rate() and ->round_rate() can return the closest rate to the
requested one or an error code.
clk_calc_new_rates is assuming these functions can't return a negative
value, which leads to a undefined behavior when the clk implementation
returns such an error code.
Fix this by returning NULL in case ->determine_rate() or ->round_rate()
returned an error code.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
Diffstat (limited to 'arch/arm/boot')
0 files changed, 0 insertions, 0 deletions