Message ID | 63d9211f-d5ce-562e-358a-50f26c7caf35@siemens.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | clk: ti: Fix reference imbalance in ti_find_clock_provider | expand |
Quoting Jan Kiszka (2022-08-08 15:26:58) > From: Jan Kiszka <jan.kiszka@siemens.com> > > When a clock is found via clock-output-names, we need to reference it > explicitly to match of_find_node_by_name behavior. Failing to do so > causes warnings like this: > Is this superseeded by https://lore.kernel.org/r/20220621091118.33930-1-tony@atomide.com?
Hello, Le 19/08/2022 à 23:23, Stephen Boyd a écrit : > Quoting Jan Kiszka (2022-08-08 15:26:58) >> From: Jan Kiszka <jan.kiszka@siemens.com> >> >> When a clock is found via clock-output-names, we need to reference it >> explicitly to match of_find_node_by_name behavior. Failing to do so >> causes warnings like this: >> > > Is this superseeded by > https://lore.kernel.org/r/20220621091118.33930-1-tony@atomide.com? I noticed the same issue and tested separately with both patches. Indeed, this patch is not needed anymore with "[PATCH] clk: ti: Fix missing of_node_get() ti_find_clock_provider()" applied. Best regards, Romain
* Romain Naour <romain.naour@smile.fr> [220823 09:22]: > Hello, > > Le 19/08/2022 à 23:23, Stephen Boyd a écrit : > > Quoting Jan Kiszka (2022-08-08 15:26:58) > >> From: Jan Kiszka <jan.kiszka@siemens.com> > >> > >> When a clock is found via clock-output-names, we need to reference it > >> explicitly to match of_find_node_by_name behavior. Failing to do so > >> causes warnings like this: > >> > > > > Is this superseeded by > > https://lore.kernel.org/r/20220621091118.33930-1-tony@atomide.com? > > I noticed the same issue and tested separately with both patches. > > Indeed, this patch is not needed anymore with "[PATCH] clk: ti: Fix missing > of_node_get() ti_find_clock_provider()" applied. OK good to hear and thanks for testing. Regards, Tony
diff --git a/drivers/clk/ti/clk.c b/drivers/clk/ti/clk.c index ef2a445c63a3..5261642974df 100644 --- a/drivers/clk/ti/clk.c +++ b/drivers/clk/ti/clk.c @@ -142,8 +142,10 @@ static struct device_node *ti_find_clock_provider(struct device_node *from, of_node_put(from); kfree(tmp); - if (found) + if (found) { + of_node_get(np); return np; + } /* Fall back to using old node name base provider name */ return of_find_node_by_name(from, name);