[PATCH 1/2] pwm: sti: return the error when requesting the IRQ fails
From: Cong Nguyen
Date: Fri Nov 27 2026 - 03:12:32 EST
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@xxxxxxxxx>
---
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