summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-17 09:44:25 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-17 09:44:25 +0200
commit0e9e37d042b1fc506287fceb939a35c35d610bf4 (patch)
tree5a87a8d81f3d44fec237efb6120216c199b15eae /drivers/clk/clk.c
parent5c3e241f5246445da29bd03783ca61a18face968 (diff)
parentd07f6ca923ea0927a1024dfccafc5b53b61cfecc (diff)
downloadlinux-stable-0e9e37d042b1fc506287fceb939a35c35d610bf4.tar.gz
linux-stable-0e9e37d042b1fc506287fceb939a35c35d610bf4.tar.bz2
linux-stable-0e9e37d042b1fc506287fceb939a35c35d610bf4.zip
Merge 5.13-rc2 into driver-core-next
We need the driver core fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r--drivers/clk/clk.c9
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) {