Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rtc: ntxec: fix OF node reference imbalance

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>
Link: https://patch.msgid.link/20260407122717.2676774-1-johan@kernel.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>

authored by

Johan Hovold and committed by
Alexandre Belloni
30c4d2f2 095a3e88

+1 -1
+1 -1
drivers/rtc/rtc-ntxec.c
··· 110 110 struct rtc_device *dev; 111 111 struct ntxec_rtc *rtc; 112 112 113 - pdev->dev.of_node = pdev->dev.parent->of_node; 113 + device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent); 114 114 115 115 rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); 116 116 if (!rtc)