soc/tegra: pmc: 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 very big number in the allocation below. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Acked-by: NJon Hunter <jonathanh@nvidia.com> Reviewed-by: NDaniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: NStephen Boyd <sboyd@kernel.org>
Showing
想要评论请 注册 或 登录