Skip to content

Commit 30c4d2f

Browse files
jhovoldalexandrebelloni
authored andcommitted
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: 435af89 ("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>
1 parent 095a3e8 commit 30c4d2f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/rtc/rtc-ntxec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ static int ntxec_rtc_probe(struct platform_device *pdev)
110110
struct rtc_device *dev;
111111
struct ntxec_rtc *rtc;
112112

113-
pdev->dev.of_node = pdev->dev.parent->of_node;
113+
device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
114114

115115
rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL);
116116
if (!rtc)

0 commit comments

Comments
 (0)