All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Nguyen <congnt264@gmail.com>
To: "Uwe Kleine-König" <ukleinek@kernel.org>
Cc: linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] pwm: sti: return the error when requesting the IRQ fails
Date: Fri, 27 Nov 2026 15:12:19 +0700	[thread overview]
Message-ID: <20261127081220.302726-1-congnt264@gmail.com> (raw)

sti_pwm_probe() calls dev_err_probe() when devm_request_irq() fails but
does not return its result, so probe continues and registers the PWM chip
without the capture interrupt handler. An -EPROBE_DEFER from the request
is also lost.

Return the error, as the code did before it was converted to
dev_err_probe().

Fixes: 3025c9c669ba ("pwm: sti: Improve error reporting using dev_err_probe()")
Signed-off-by: Cong Nguyen <congnt264@gmail.com>
---
If continuing without the capture interrupt was intended, please
ignore this patch.

 drivers/pwm/pwm-sti.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/pwm-sti.c b/drivers/pwm/pwm-sti.c
index c1beacb26b4d..bdbb61e44fe8 100644
--- a/drivers/pwm/pwm-sti.c
+++ b/drivers/pwm/pwm-sti.c
@@ -571,7 +571,7 @@ static int sti_pwm_probe(struct platform_device *pdev)
 	ret = devm_request_irq(&pdev->dev, irq, sti_pwm_interrupt, 0,
 			       pdev->name, pc);
 	if (ret < 0)
-		dev_err_probe(&pdev->dev, ret, "Failed to request IRQ\n");
+		return dev_err_probe(&pdev->dev, ret, "Failed to request IRQ\n");
 
 	/*
 	 * Setup PWM data with default values: some values could be replaced
-- 
2.25.1


             reply	other threads:[~2026-11-27  8:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-27  8:12 Cong Nguyen [this message]
2026-11-27  8:12 ` [PATCH 2/2] pwm: sti: request the IRQ after the driver data is initialised Cong Nguyen

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=20261127081220.302726-1-congnt264@gmail.com \
    --to=congnt264@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=ukleinek@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.