[PATCH v2] thermal/drivers: Remove redundant error messages on IRQ request failure
From: Pan Chuang
Date: Thu Jul 16 2026 - 22:50:39 EST
Since commit 55b48e23f5c4 ("genirq/devres: Add error handling in
devm_request_*_irq()"), devm_request_irq() and devm_request_threaded_irq()
automatically log detailed error messages on failure. Remove the
now-redundant driver-specific dev_err() and dev_err_probe() calls.
Signed-off-by: Pan Chuang <panchuang@xxxxxxxx>
Reviewed-by: Frank Li <Frank.Li@xxxxxxx>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
Reviewed-by: Niklas S?derlund <niklas.soderlund+renesas@xxxxxxxxxxxx>
---
drivers/thermal/airoha_thermal.c | 4 +---
drivers/thermal/armada_thermal.c | 5 +----
drivers/thermal/broadcom/brcmstb_thermal.c | 3 +--
drivers/thermal/db8500_thermal.c | 8 ++------
drivers/thermal/hisi_thermal.c | 4 +---
drivers/thermal/imx91_thermal.c | 2 +-
drivers/thermal/imx_thermal.c | 4 +---
.../intel/int340x_thermal/processor_thermal_device_pci.c | 8 ++------
drivers/thermal/intel/intel_bxt_pmic_thermal.c | 4 +---
drivers/thermal/loongson2_thermal.c | 2 +-
drivers/thermal/max77620_thermal.c | 8 ++------
drivers/thermal/mediatek/lvts_thermal.c | 2 +-
drivers/thermal/qcom/lmh.c | 1 -
drivers/thermal/qcom/tsens.c | 5 +----
drivers/thermal/renesas/rcar_thermal.c | 4 +---
drivers/thermal/renesas/rzg3e_thermal.c | 4 +---
drivers/thermal/rockchip_thermal.c | 3 +--
drivers/thermal/samsung/exynos_tmu.c | 4 +---
drivers/thermal/st/st_thermal_memmap.c | 4 +---
drivers/thermal/st/stm_thermal.c | 5 +----
drivers/thermal/tegra/soctherm.c | 8 ++------
drivers/thermal/tegra/tegra30-tsensor.c | 3 +--
22 files changed, 25 insertions(+), 70 deletions(-)
diff --git a/drivers/thermal/airoha_thermal.c b/drivers/thermal/airoha_thermal.c
index b9fd6bfc88e5..b1c2bf28a90e 100644
--- a/drivers/thermal/airoha_thermal.c
+++ b/drivers/thermal/airoha_thermal.c
@@ -444,10 +444,8 @@ static int airoha_thermal_probe(struct platform_device *pdev)
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
airoha_thermal_irq, IRQF_ONESHOT,
pdev->name, priv);
- if (ret) {
- dev_err(dev, "Can't get interrupt working.\n");
+ if (ret)
return ret;
- }
airoha_thermal_setup_monitor(priv);
airoha_thermal_setup_adc_val(dev, priv);
diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index c2fbdb534f61..44910a953439 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -913,11 +913,8 @@ static int armada_thermal_probe(struct platform_device *pdev)
armada_overheat_isr,
armada_overheat_isr_thread,
0, NULL, priv);
- if (ret) {
- dev_err(&pdev->dev, "Cannot request threaded IRQ %d\n",
- irq);
+ if (ret)
return ret;
- }
}
/*
diff --git a/drivers/thermal/broadcom/brcmstb_thermal.c b/drivers/thermal/broadcom/brcmstb_thermal.c
index a9ffa596f7c0..5e23f9e00847 100644
--- a/drivers/thermal/broadcom/brcmstb_thermal.c
+++ b/drivers/thermal/broadcom/brcmstb_thermal.c
@@ -356,8 +356,7 @@ static int brcmstb_thermal_probe(struct platform_device *pdev)
IRQF_ONESHOT,
DRV_NAME, priv);
if (ret < 0)
- return dev_err_probe(&pdev->dev, ret,
- "could not request IRQ\n");
+ return ret;
}
dev_info(&pdev->dev, "registered AVS TMON of-sensor driver\n");
diff --git a/drivers/thermal/db8500_thermal.c b/drivers/thermal/db8500_thermal.c
index cf1706569e6d..46005b476722 100644
--- a/drivers/thermal/db8500_thermal.c
+++ b/drivers/thermal/db8500_thermal.c
@@ -167,10 +167,8 @@ static int db8500_thermal_probe(struct platform_device *pdev)
ret = devm_request_threaded_irq(dev, low_irq, NULL,
prcmu_low_irq_handler, IRQF_NO_SUSPEND | IRQF_ONESHOT,
"dbx500_temp_low", th);
- if (ret < 0) {
- dev_err(dev, "failed to allocate temp low irq\n");
+ if (ret < 0)
return ret;
- }
high_irq = platform_get_irq_byname(pdev, "IRQ_HOTMON_HIGH");
if (high_irq < 0)
@@ -179,10 +177,8 @@ static int db8500_thermal_probe(struct platform_device *pdev)
ret = devm_request_threaded_irq(dev, high_irq, NULL,
prcmu_high_irq_handler, IRQF_NO_SUSPEND | IRQF_ONESHOT,
"dbx500_temp_high", th);
- if (ret < 0) {
- dev_err(dev, "failed to allocate temp high irq\n");
+ if (ret < 0)
return ret;
- }
/* register of thermal sensor and get info from DT */
th->tz = devm_thermal_of_zone_register(dev, 0, th, &thdev_ops);
diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c
index 4307161533a7..17ed0c5b7767 100644
--- a/drivers/thermal/hisi_thermal.c
+++ b/drivers/thermal/hisi_thermal.c
@@ -578,10 +578,8 @@ static int hisi_thermal_probe(struct platform_device *pdev)
hisi_thermal_alarm_irq_thread,
IRQF_ONESHOT, sensor->irq_name,
sensor);
- if (ret < 0) {
- dev_err(dev, "Failed to request alarm irq: %d\n", ret);
+ if (ret < 0)
return ret;
- }
ret = data->ops->enable_sensor(sensor);
if (ret) {
diff --git a/drivers/thermal/imx91_thermal.c b/drivers/thermal/imx91_thermal.c
index 25915bb702be..274eee303142 100644
--- a/drivers/thermal/imx91_thermal.c
+++ b/drivers/thermal/imx91_thermal.c
@@ -331,7 +331,7 @@ static int imx91_tmu_probe(struct platform_device *pdev)
IRQF_ONESHOT, "imx91_thermal", tmu);
if (ret < 0)
- return dev_err_probe(dev, ret, "failed to request alarm irq\n");
+ return ret;
pm_runtime_put(dev);
diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
index 5aaacbc53478..416d89c6287a 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -732,10 +732,8 @@ static int imx_thermal_probe(struct platform_device *pdev)
ret = devm_request_threaded_irq(dev, data->irq,
imx_thermal_alarm_irq, imx_thermal_alarm_irq_thread,
0, "imx_thermal", data);
- if (ret < 0) {
- dev_err(dev, "failed to request alarm irq: %d\n", ret);
+ if (ret < 0)
goto thermal_zone_unregister;
- }
pm_runtime_put(data->dev);
diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c b/drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c
index c693d934103a..c5131423ec9b 100644
--- a/drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c
+++ b/drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c
@@ -308,10 +308,8 @@ static int proc_thermal_setup_msi(struct pci_dev *pdev, struct proc_thermal_pci
ret = devm_request_threaded_irq(&pdev->dev, irq, proc_thermal_irq_handler,
proc_thermal_irq_thread_handler,
0, KBUILD_MODNAME, pci_info);
- if (ret) {
- dev_err(&pdev->dev, "Request IRQ %d failed\n", irq);
+ if (ret)
goto err_free_msi_vectors;
- }
proc_thermal_msi_map[i] = irq;
}
@@ -394,10 +392,8 @@ static int proc_thermal_pci_probe(struct pci_dev *pdev, const struct pci_device_
ret = devm_request_threaded_irq(&pdev->dev, irq, proc_thermal_irq_handler,
proc_thermal_irq_thread_handler, irq_flag,
KBUILD_MODNAME, pci_info);
- if (ret) {
- dev_err(&pdev->dev, "Request IRQ %d failed\n", pdev->irq);
+ if (ret)
goto err_ret_tzone;
- }
}
ret = thermal_zone_device_enable(pci_info->tzone);
diff --git a/drivers/thermal/intel/intel_bxt_pmic_thermal.c b/drivers/thermal/intel/intel_bxt_pmic_thermal.c
index 6312c6ba081f..aeaefbbd5d8f 100644
--- a/drivers/thermal/intel/intel_bxt_pmic_thermal.c
+++ b/drivers/thermal/intel/intel_bxt_pmic_thermal.c
@@ -245,10 +245,8 @@ static int pmic_thermal_probe(struct platform_device *pdev)
NULL, pmic_thermal_irq_handler,
IRQF_ONESHOT, "pmic_thermal", pdev);
- if (ret) {
- dev_err(dev, "request irq(%d) failed: %d\n", virq, ret);
+ if (ret)
return ret;
- }
pmic_irq_count++;
}
diff --git a/drivers/thermal/loongson2_thermal.c b/drivers/thermal/loongson2_thermal.c
index 88f87badfdf6..4d40fc706a53 100644
--- a/drivers/thermal/loongson2_thermal.c
+++ b/drivers/thermal/loongson2_thermal.c
@@ -173,7 +173,7 @@ static int loongson2_thermal_probe(struct platform_device *pdev)
ret = devm_request_threaded_irq(dev, irq, NULL, loongson2_thermal_irq_thread,
IRQF_ONESHOT, "loongson2_thermal", tzd);
if (ret < 0)
- return dev_err_probe(dev, ret, "failed to request alarm irq\n");
+ return ret;
devm_thermal_add_hwmon_sysfs(dev, tzd);
diff --git a/drivers/thermal/max77620_thermal.c b/drivers/thermal/max77620_thermal.c
index 85a12e98d6dc..f4a1535f4806 100644
--- a/drivers/thermal/max77620_thermal.c
+++ b/drivers/thermal/max77620_thermal.c
@@ -121,19 +121,15 @@ static int max77620_thermal_probe(struct platform_device *pdev)
max77620_thermal_irq,
IRQF_ONESHOT | IRQF_SHARED,
dev_name(&pdev->dev), mtherm);
- if (ret < 0) {
- dev_err(&pdev->dev, "Failed to request irq1: %d\n", ret);
+ if (ret < 0)
return ret;
- }
ret = devm_request_threaded_irq(&pdev->dev, mtherm->irq_tjalarm2, NULL,
max77620_thermal_irq,
IRQF_ONESHOT | IRQF_SHARED,
dev_name(&pdev->dev), mtherm);
- if (ret < 0) {
- dev_err(&pdev->dev, "Failed to request irq2: %d\n", ret);
+ if (ret < 0)
return ret;
- }
return 0;
}
diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c
index a9617d5e0077..d357968f362b 100644
--- a/drivers/thermal/mediatek/lvts_thermal.c
+++ b/drivers/thermal/mediatek/lvts_thermal.c
@@ -1491,7 +1491,7 @@ static int lvts_probe(struct platform_device *pdev)
ret = devm_request_threaded_irq(dev, irq, NULL, lvts_irq_handler,
IRQF_ONESHOT, dev_name(dev), lvts_td);
if (ret)
- return dev_err_probe(dev, ret, "Failed to request interrupt\n");
+ return ret;
platform_set_drvdata(pdev, lvts_td);
diff --git a/drivers/thermal/qcom/lmh.c b/drivers/thermal/qcom/lmh.c
index 3d072b7a4a6d..99396b93eff5 100644
--- a/drivers/thermal/qcom/lmh.c
+++ b/drivers/thermal/qcom/lmh.c
@@ -223,7 +223,6 @@ static int lmh_probe(struct platform_device *pdev)
IRQF_NO_THREAD | IRQF_NO_SUSPEND,
"lmh-irq", lmh_data);
if (ret) {
- dev_err(dev, "Error %d registering irq %x\n", ret, lmh_data->irq);
irq_domain_remove(lmh_data->domain);
return ret;
}
diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index 6e3714ecab1d..b5ec70201e2f 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -1258,10 +1258,7 @@ static int tsens_register_irq(struct tsens_priv *priv, char *irqname,
dev_name(&pdev->dev),
priv);
- if (ret)
- dev_err(&pdev->dev, "%s: failed to get irq\n",
- __func__);
- else
+ if (!ret)
*irq_num = irq;
}
diff --git a/drivers/thermal/renesas/rcar_thermal.c b/drivers/thermal/renesas/rcar_thermal.c
index 6e5dcac5d47a..cf80e2655416 100644
--- a/drivers/thermal/renesas/rcar_thermal.c
+++ b/drivers/thermal/renesas/rcar_thermal.c
@@ -446,10 +446,8 @@ static int rcar_thermal_probe(struct platform_device *pdev)
ret = devm_request_irq(dev, irq, rcar_thermal_irq,
IRQF_SHARED, dev_name(dev), common);
- if (ret) {
- dev_err(dev, "irq request failed\n");
+ if (ret)
goto error_unregister;
- }
/* update ENR bits */
if (chip->irq_per_ch)
diff --git a/drivers/thermal/renesas/rzg3e_thermal.c b/drivers/thermal/renesas/rzg3e_thermal.c
index f0e29fe633db..c44f5b8858d0 100644
--- a/drivers/thermal/renesas/rzg3e_thermal.c
+++ b/drivers/thermal/renesas/rzg3e_thermal.c
@@ -461,10 +461,8 @@ static int rzg3e_thermal_probe(struct platform_device *pdev)
ret = devm_request_threaded_irq(dev, irq, rzg3e_thermal_irq,
rzg3e_thermal_irq_thread,
IRQF_ONESHOT, "rzg3e_thermal", priv);
- if (ret) {
- dev_err(dev, "Failed to request IRQ: %d\n", ret);
+ if (ret)
goto err_pm_put;
- }
/* Add hwmon sysfs interface */
ret = devm_thermal_add_hwmon_sysfs(dev, priv->zone);
diff --git a/drivers/thermal/rockchip_thermal.c b/drivers/thermal/rockchip_thermal.c
index c49ddf70f86e..08891608baa6 100644
--- a/drivers/thermal/rockchip_thermal.c
+++ b/drivers/thermal/rockchip_thermal.c
@@ -1773,8 +1773,7 @@ static int rockchip_thermal_probe(struct platform_device *pdev)
IRQF_ONESHOT,
"rockchip_thermal", thermal);
if (error)
- return dev_err_probe(&pdev->dev, error,
- "failed to request tsadc irq.\n");
+ return error;
thermal->chip->control(thermal->regs, true);
diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 47a99b3c5395..56717bb50d60 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -1102,10 +1102,8 @@ static int exynos_tmu_probe(struct platform_device *pdev)
IRQF_TRIGGER_RISING
| IRQF_SHARED | IRQF_ONESHOT,
dev_name(dev), data);
- if (ret) {
- dev_err(dev, "Failed to request irq: %d\n", data->irq);
+ if (ret)
goto err_sclk;
- }
exynos_tmu_control(pdev, true);
return 0;
diff --git a/drivers/thermal/st/st_thermal_memmap.c b/drivers/thermal/st/st_thermal_memmap.c
index 8f76e50ea567..e3dbe4df80cb 100644
--- a/drivers/thermal/st/st_thermal_memmap.c
+++ b/drivers/thermal/st/st_thermal_memmap.c
@@ -101,10 +101,8 @@ static int st_mmap_register_enable_irq(struct st_thermal_sensor *sensor)
NULL, st_mmap_thermal_trip_handler,
IRQF_TRIGGER_RISING | IRQF_ONESHOT,
dev->driver->name, sensor);
- if (ret) {
- dev_err(dev, "failed to register IRQ %d\n", sensor->irq);
+ if (ret)
return ret;
- }
return st_mmap_enable_irq(sensor);
}
diff --git a/drivers/thermal/st/stm_thermal.c b/drivers/thermal/st/stm_thermal.c
index 5d8170bfb382..3290da7ab607 100644
--- a/drivers/thermal/st/stm_thermal.c
+++ b/drivers/thermal/st/stm_thermal.c
@@ -390,11 +390,8 @@ static int stm_register_irq(struct stm_thermal_sensor *sensor)
stm_thermal_irq_handler,
IRQF_ONESHOT,
dev->driver->name, sensor);
- if (ret) {
- dev_err(dev, "%s: Failed to register IRQ %d\n", __func__,
- sensor->irq);
+ if (ret)
return ret;
- }
dev_dbg(dev, "%s: thermal IRQ registered", __func__);
diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c
index d8e988a0d43e..f74acf13b24d 100644
--- a/drivers/thermal/tegra/soctherm.c
+++ b/drivers/thermal/tegra/soctherm.c
@@ -2007,10 +2007,8 @@ static int soctherm_interrupts_init(struct platform_device *pdev,
IRQF_ONESHOT,
dev_name(&pdev->dev),
tegra);
- if (ret < 0) {
- dev_err(&pdev->dev, "request_irq 'thermal_irq' failed.\n");
+ if (ret < 0)
return ret;
- }
ret = devm_request_threaded_irq(&pdev->dev,
tegra->edp_irq,
@@ -2019,10 +2017,8 @@ static int soctherm_interrupts_init(struct platform_device *pdev,
IRQF_ONESHOT,
"soctherm_edp",
tegra);
- if (ret < 0) {
- dev_err(&pdev->dev, "request_irq 'edp_irq' failed.\n");
+ if (ret < 0)
return ret;
- }
return 0;
}
diff --git a/drivers/thermal/tegra/tegra30-tsensor.c b/drivers/thermal/tegra/tegra30-tsensor.c
index 6245f6b97f43..10a5ab1fe1b9 100644
--- a/drivers/thermal/tegra/tegra30-tsensor.c
+++ b/drivers/thermal/tegra/tegra30-tsensor.c
@@ -602,8 +602,7 @@ static int tegra_tsensor_probe(struct platform_device *pdev)
tegra_tsensor_isr, IRQF_ONESHOT,
"tegra_tsensor", ts);
if (err)
- return dev_err_probe(&pdev->dev, err,
- "failed to request interrupt\n");
+ return err;
return 0;
}
--
2.34.1