Skip to content

Commit a995c50

Browse files
Minjie Dubebarino
authored andcommitted
drivers: clk: keystone: Fix parameter judgment in _of_pll_clk_init()
The function clk_register_pll() may return NULL or an ERR_PTR. Don't treat an ERR_PTR as valid. Signed-off-by: Minjie Du <[email protected]> Link: https://lore.kernel.org/r/[email protected] Fixes: b9e0d40 ("clk: keystone: add Keystone PLL clock driver") [[email protected]: Reword commit text] Signed-off-by: Stephen Boyd <[email protected]>
1 parent a96cbb1 commit a995c50

File tree

1 file changed

+1
-1
lines changed
  • drivers/clk/keystone

1 file changed

+1
-1
lines changed

drivers/clk/keystone/pll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ static void __init _of_pll_clk_init(struct device_node *node, bool pllctrl)
209209
}
210210

211211
clk = clk_register_pll(NULL, node->name, parent_name, pll_data);
212-
if (clk) {
212+
if (!IS_ERR_OR_NULL(clk)) {
213213
of_clk_add_provider(node, of_clk_src_simple_get, clk);
214214
return;
215215
}

0 commit comments

Comments
 (0)