All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit 7e196aa1 authored by Wei Yongjun's avatar Wei Yongjun Committed by Maxime Ripard

clk: sunxi: pll2: Fix return value check in sun4i_pll2_setup()

In case of error, the functions clk_register_composite() and
clk_register_divider() returns ERR_PTR() and never returns NULL.
The NULL test in the return value check should be replaced with
Signed-off-by: default avatarWei Yongjun <>
Signed-off-by: default avatarMaxime Ripard <>
parent 29b4817d
......@@ -73,7 +73,7 @@ static void __init sun4i_pll2_setup(struct device_node *node,
if (!prediv_clk) {
if (IS_ERR(prediv_clk)) {
pr_err("Couldn't register the prediv clock\n");
goto err_free_array;
......@@ -106,7 +106,7 @@ static void __init sun4i_pll2_setup(struct device_node *node,
&mult->hw, &clk_multiplier_ops,
&gate->hw, &clk_gate_ops,
if (!base_clk) {
if (IS_ERR(base_clk)) {
pr_err("Couldn't register the base multiplier clock\n");
goto err_free_multiplier;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment