mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] clocksource: ti-dm: fix EPROBE_DEFER handling
@ 2025-05-19 18:59 Ahmad Fatoum
  2025-05-20  7:51 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2025-05-19 18:59 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

barebox initializes only a single ti-dm timer and stores its non-NULL
MMIO base address to the global base variable to indicate a successful
probe.

If clock_get were to fail with any error code, base would remain set,
hindering future probes of the driver. This would be especially
bothersome with EPROBE_DEFER if deep probe is not enabled.

Fix this by removing the early setting of the base variable.

Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 drivers/clocksource/timer-ti-dm.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
index 7fa159723b11..7cc0422d1d16 100644
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -96,7 +96,6 @@ static int omap_dmtimer_probe(struct device *dev)
 	iores = dev_request_mem_resource(dev, 0);
 	if (IS_ERR(iores))
 		return PTR_ERR(iores);
-	base = IOMEM(iores->start);
 
 	data = device_get_match_data(dev);
 
-- 
2.39.5




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

* Re: [PATCH] clocksource: ti-dm: fix EPROBE_DEFER handling
  2025-05-19 18:59 [PATCH] clocksource: ti-dm: fix EPROBE_DEFER handling Ahmad Fatoum
@ 2025-05-20  7:51 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2025-05-20  7:51 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Mon, 19 May 2025 20:59:17 +0200, Ahmad Fatoum wrote:
> barebox initializes only a single ti-dm timer and stores its non-NULL
> MMIO base address to the global base variable to indicate a successful
> probe.
> 
> If clock_get were to fail with any error code, base would remain set,
> hindering future probes of the driver. This would be especially
> bothersome with EPROBE_DEFER if deep probe is not enabled.
> 
> [...]

Applied, thanks!

[1/1] clocksource: ti-dm: fix EPROBE_DEFER handling
      https://git.pengutronix.de/cgit/barebox/commit/?id=225d82666eb0 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




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

end of thread, other threads:[~2025-05-20  7:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-19 18:59 [PATCH] clocksource: ti-dm: fix EPROBE_DEFER handling Ahmad Fatoum
2025-05-20  7:51 ` Sascha Hauer

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