mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] rtc: rtc-pic32: handle clock enable failure
@ 2026-08-18 13:10 Jiawen Liu
  2026-08-20  9:35 ` Markus Elfring
  0 siblings, 1 reply; 4+ messages in thread
From: Jiawen Liu @ 2026-08-18 13:10 UTC (permalink / raw)
  To: linux-kernel

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);
 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] rtc: rtc-pic32: handle clock enable failure
  2026-08-18 13:10 [PATCH] rtc: rtc-pic32: handle clock enable failure Jiawen Liu
@ 2026-08-20  9:35 ` Markus Elfring
  2026-08-20  9:39   ` Robert P. J. Day
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Elfring @ 2026-08-20  9:35 UTC (permalink / raw)
  To: 1298662399, linux-rtc, Alexandre Belloni; +Cc: LKML, kernel-janitors

…
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] rtc: rtc-pic32: handle clock enable failure
  2026-08-20  9:35 ` Markus Elfring
@ 2026-08-20  9:39   ` Robert P. J. Day
  2026-08-20 10:04     ` Markus Elfring
  0 siblings, 1 reply; 4+ messages in thread
From: Robert P. J. Day @ 2026-08-20  9:39 UTC (permalink / raw)
  To: Markus Elfring
  Cc: 1298662399, linux-rtc, Alexandre Belloni, LKML, kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 321 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: rtc: rtc-pic32: handle clock enable failure
  2026-08-20  9:39   ` Robert P. J. Day
@ 2026-08-20 10:04     ` Markus Elfring
  0 siblings, 0 replies; 4+ messages in thread
From: Markus Elfring @ 2026-08-20 10:04 UTC (permalink / raw)
  To: Robert P. J. Day, linux-rtc
  Cc: 1298662399, Alexandre Belloni, LKML, kernel-janitors

>> …
>>> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-20 10:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-18 13:10 [PATCH] rtc: rtc-pic32: handle clock enable failure Jiawen Liu
2026-08-20  9:35 ` Markus Elfring
2026-08-20  9:39   ` Robert P. J. Day
2026-08-20 10:04     ` Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®