Commit e37868f1 authored by Dan Carpenter's avatar Dan Carpenter Committed by Geert Uytterhoeven

clk: renesas: rzg2l: Avoid mixing error pointers and NULL

These functions accidentally return both error pointers and NULL when
there is an error.  It doesn't cause a problem but it is confusing and
seems unintentional.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Link: https://lore.kernel.org/r/YMtY7nOtqEvTokh7@mwandaSigned-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
parent 36aaa3a0
......@@ -125,7 +125,7 @@ rzg2l_cpg_div_clk_register(const struct cpg_core_clk *core,
core->flag, &priv->rmw_lock);
if (IS_ERR(clk_hw))
return NULL;
return ERR_CAST(clk_hw);
return clk_hw->clk;
}
......
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