mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH] clocksource: ti-dm: fix EPROBE_DEFER handling
Date: Mon, 19 May 2025 20:59:17 +0200	[thread overview]
Message-ID: <20250519185917.459180-1-a.fatoum@barebox.org> (raw)

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




             reply	other threads:[~2025-05-19 19:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-19 18:59 Ahmad Fatoum [this message]
2025-05-20  7:51 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250519185917.459180-1-a.fatoum@barebox.org \
    --to=a.fatoum@barebox.org \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox