soc: rockchip: power-domain: Use of_clk_get_parent_count() instead of open coding
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 18 Apr 2018 14:50:03 +0000 (16:50 +0200)
committerStephen Boyd <sboyd@kernel.org>
Wed, 2 May 2018 15:33:52 +0000 (08:33 -0700)
commit54d52ad940bb50284c85adcf481413fb3b82925a
tree6b17383d2ae12f4d9ed4f761abc02e45283baee5
parentb799cac753e3efa8c38e8e0061da36705aad1e27
soc: rockchip: power-domain: Use of_clk_get_parent_count() instead of open coding

As of_clk_get_parent_count() returns zero on failure, while
of_count_phandle_with_args() might return a negative error code, this
also fixes the issue of possibly using a negative number in the
allocation below.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/soc/rockchip/pm_domains.c