diff options
author | Tejun Heo <tj@kernel.org> | 2021-05-24 13:43:56 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2021-05-24 13:43:56 -0400 |
commit | c2a11971549b16a24cce81250d84b63d53499fd0 (patch) | |
tree | 7bfa4b1c61ec5ad44834a3e38da3d4958517a00f /drivers/clk | |
parent | f4f809f66b7545b89bff4b132cdb37adc2d2c157 (diff) | |
parent | 08b2b6fdf6b26032f025084ce2893924a0cdb4a2 (diff) |
Merge branch 'for-5.13-fixes' into for-5.14
Diffstat (limited to 'drivers/clk')
-rw-r--r-- | drivers/clk/clk.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index e2ec1b745243..65508eb89ec9 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -4540,6 +4540,9 @@ int of_clk_add_provider(struct device_node *np, struct of_clk_provider *cp; int ret; + if (!np) + return 0; + cp = kzalloc(sizeof(*cp), GFP_KERNEL); if (!cp) return -ENOMEM; @@ -4579,6 +4582,9 @@ int of_clk_add_hw_provider(struct device_node *np, struct of_clk_provider *cp; int ret; + if (!np) + return 0; + cp = kzalloc(sizeof(*cp), GFP_KERNEL); if (!cp) return -ENOMEM; @@ -4676,6 +4682,9 @@ void of_clk_del_provider(struct device_node *np) { struct of_clk_provider *cp; + if (!np) + return; + mutex_lock(&of_clk_mutex); list_for_each_entry(cp, &of_clk_providers, link) { if (cp->node == np) { |