]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: rockchip: Fix static checker warning in rockchip_ddrclk_get_parent call
authorEnric Balletbo i Serra <enric.balletbo@collabora.com>
Tue, 16 Oct 2018 13:41:44 +0000 (15:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Nov 2018 08:22:03 +0000 (09:22 +0100)
commit1189a221680017f7ffec6165085e66185f9b2581
tree981a5198050f3068ef22a8845e1989f2de316e06
parent91a17b82ae41023c5160a5bd4e650868932e61f8
clk: rockchip: Fix static checker warning in rockchip_ddrclk_get_parent call

commit 665636b2940d0897c4130253467f5e8c42eea392 upstream.

Fixes the signedness bug returning '(-22)' on the return type by removing the
sanity checker in rockchip_ddrclk_get_parent(). The function should return
and unsigned value only and it's safe to remove the sanity checker as the
core functions that call get_parent like clk_core_get_parent_by_index already
ensures the validity of the clk index returned (index >= core->num_parents).

Fixes: a4f182bf81f18 ("clk: rockchip: add new clock-type for the ddrclk")
Cc: stable@vger.kernel.org
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/clk/rockchip/clk-ddr.c