* [PATCH] rtc: ntxec: fix OF node reference imbalance
@ 2026-04-07 12:27 Johan Hovold
2026-04-12 20:54 ` Alexandre Belloni
0 siblings, 1 reply; 2+ messages in thread
From: Johan Hovold @ 2026-04-07 12:27 UTC (permalink / raw)
To: Jonathan Neuschäfer, Alexandre Belloni
Cc: linux-rtc, linux-kernel, Johan Hovold, stable
The driver reuses the OF node of the parent multi-function device but
fails to take another reference to balance the one dropped by the
platform bus code when unbinding the MFD and deregistering the child
devices.
Fix this by using the intended helper for reusing OF nodes.
Fixes: 435af89786c6 ("rtc: New driver for RTC in Netronix embedded controller")
Cc: stable@vger.kernel.org # 5.13
Cc: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/rtc/rtc-ntxec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-ntxec.c b/drivers/rtc/rtc-ntxec.c
index 850ca49186fd..d28ddb34e19e 100644
--- a/drivers/rtc/rtc-ntxec.c
+++ b/drivers/rtc/rtc-ntxec.c
@@ -110,7 +110,7 @@ static int ntxec_rtc_probe(struct platform_device *pdev)
struct rtc_device *dev;
struct ntxec_rtc *rtc;
- pdev->dev.of_node = pdev->dev.parent->of_node;
+ device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL);
if (!rtc)
--
2.52.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rtc: ntxec: fix OF node reference imbalance
2026-04-07 12:27 [PATCH] rtc: ntxec: fix OF node reference imbalance Johan Hovold
@ 2026-04-12 20:54 ` Alexandre Belloni
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2026-04-12 20:54 UTC (permalink / raw)
To: Jonathan Neuschäfer, Johan Hovold; +Cc: linux-rtc, linux-kernel, stable
On Tue, 07 Apr 2026 14:27:17 +0200, Johan Hovold wrote:
> The driver reuses the OF node of the parent multi-function device but
> fails to take another reference to balance the one dropped by the
> platform bus code when unbinding the MFD and deregistering the child
> devices.
>
> Fix this by using the intended helper for reusing OF nodes.
>
> [...]
Applied, thanks!
[1/1] rtc: ntxec: fix OF node reference imbalance
https://git.kernel.org/abelloni/c/30c4d2f26bb3
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-12 20:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-07 12:27 [PATCH] rtc: ntxec: fix OF node reference imbalance Johan Hovold
2026-04-12 20:54 ` Alexandre Belloni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.