]> git.baikalelectronics.ru Git - kernel.git/commit
clk: sprd: return correct type of value for _sprd_pll_recalc_rate
authorChunyan Zhang <chunyan.zhang@unisoc.com>
Tue, 19 May 2020 03:00:36 +0000 (11:00 +0800)
committerStephen Boyd <sboyd@kernel.org>
Wed, 27 May 2020 03:14:56 +0000 (20:14 -0700)
commit2ad7aedc736ed0650e777b9b0d951e3991545185
tree01913a1efc39fa3fc2a5a0864d063e2c87242ee5
parentcfcb20a67de0c4e01f51c23f8efd348696d5d8f3
clk: sprd: return correct type of value for _sprd_pll_recalc_rate

The function _sprd_pll_recalc_rate() defines return value to unsigned
long, but it would return a negative value when malloc fail, changing
to return its parent_rate makes more sense, since if the callback
.recalc_rate() is not set, the framework returns the parent_rate as
well.

Fixes: 7c8986590aa5 ("clk: sprd: add adjustable pll support")
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Link: https://lkml.kernel.org/r/20200519030036.1785-2-zhang.lyra@gmail.com
Reviewed-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/sprd/pll.c