Return error from failed clock enable.
Pic32 RTC ignores clk_prepare_enable return before hardware access and
later disables/unprepares clock same pic32 RTC unchecked
clk_prepare_enable.
Check early clk_prepare_enable(pdata->clk) return in pic32_rtc_probe.
Signed-off-by: jiawen <1298662399@qq.com>
---
diff --git a/drivers/rtc/rtc-pic32.c b/drivers/rtc/rtc-pic32.c
--- a/drivers/rtc/rtc-pic32.c
+++ b/drivers/rtc/rtc-pic32.c
@@ -325,7 +325,9 @@
if (IS_ERR(pdata->rtc))
return PTR_ERR(pdata->rtc);
- clk_prepare_enable(pdata->clk);
+ ret = clk_prepare_enable(pdata->clk);
+ if (ret)
+ return ret;
pic32_rtc_enable(pdata, 1);
… > Check early clk_prepare_enable(pdata->clk) return in pic32_rtc_probe. I find such a wording approach improvable. How do you think about to add any tags (like “Fixes” and “Cc”) accordingly? See also once more: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/stable-kernel-rules.rst?h=v7.2#n34 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v7.2#n145 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v7.2#n792 The message recipient specifications should be extended. Regards, Markus
On Thu, 20 Aug 2026, Markus Elfring wrote: > … > > Check early clk_prepare_enable(pdata->clk) return in pic32_rtc_probe. > > I find such a wording approach improvable. > How do you think about to add any tags (like “Fixes” and “Cc”) accordingly? How many times are you going to ask this same question? rday
>> … >>> Check early clk_prepare_enable(pdata->clk) return in pic32_rtc_probe. >> >> I find such a wording approach improvable. >> How do you think about to add any tags (like “Fixes” and “Cc”) accordingly? > > How many times are you going to ask this same question? I got the impression that another reminder would be needed also for the presented patch. Regards, Markus
© 2016 - 2026 Red Hat, Inc.