Do not use driver_override as IRQ name, as it is not guaranteed to point
to a valid string; use NULL instead (which makes the devm IRQ helpers
use dev_name()).
Fixes: 8412b410fa5e ("hwmon: Support ADI Fan Control IP")
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
---
drivers/hwmon/axi-fan-control.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/axi-fan-control.c b/drivers/hwmon/axi-fan-control.c
index b7bb325c3ad9..01590dfa55e6 100644
--- a/drivers/hwmon/axi-fan-control.c
+++ b/drivers/hwmon/axi-fan-control.c
@@ -507,7 +507,7 @@ static int axi_fan_control_probe(struct platform_device *pdev)
ret = devm_request_threaded_irq(&pdev->dev, ctl->irq, NULL,
axi_fan_control_irq_handler,
IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
- pdev->driver_override, ctl);
+ NULL, ctl);
if (ret)
return dev_err_probe(&pdev->dev, ret,
"failed to request an irq\n");
--
2.53.0
From: Frank Li (AI-BOT) <frank.li@nxp.com> > ret = devm_request_threaded_irq(&pdev->dev, ctl->irq, NULL, > axi_fan_control_irq_handler, > IRQF_ONESHOT | IRQF_TRIGGER_HIGH, > - pdev->driver_override, ctl); > + NULL, ctl); Good catch. Using driver_override as IRQ name is indeed unsafe since it's not guaranteed to be a valid string. Passing NULL is correct here; the devm IRQ helpers will fall back to dev_name() which is always valid. The fix is minimal and addresses the root cause. The error handling path below looks fine—dev_err_probe() will still work correctly with the NULL name. Looks good to me. AI bot review and may be useless.
On Tue, Mar 03, 2026 at 12:53:20PM +0100, Danilo Krummrich wrote:
> Do not use driver_override as IRQ name, as it is not guaranteed to point
> to a valid string; use NULL instead (which makes the devm IRQ helpers
> use dev_name()).
>
> Fixes: 8412b410fa5e ("hwmon: Support ADI Fan Control IP")
> Signed-off-by: Danilo Krummrich <dakr@kernel.org>
> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Applied.
Thanks,
Guenter
On Tue Mar 3, 2026 at 5:23 PM CET, Guenter Roeck wrote:
> On Tue, Mar 03, 2026 at 12:53:20PM +0100, Danilo Krummrich wrote:
>> Do not use driver_override as IRQ name, as it is not guaranteed to point
>> to a valid string; use NULL instead (which makes the devm IRQ helpers
>> use dev_name()).
>>
>> Fixes: 8412b410fa5e ("hwmon: Support ADI Fan Control IP")
>> Signed-off-by: Danilo Krummrich <dakr@kernel.org>
>> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
>
> Applied.
I need this patch in the driver-core tree, otherwise I can't land patch 4 of
this series [1]. :(
Any chance you can drop it from your tree?
[1] https://lore.kernel.org/driver-core/20260303115720.48783-5-dakr@kernel.org/
On 3/3/26 08:25, Danilo Krummrich wrote:
> On Tue Mar 3, 2026 at 5:23 PM CET, Guenter Roeck wrote:
>> On Tue, Mar 03, 2026 at 12:53:20PM +0100, Danilo Krummrich wrote:
>>> Do not use driver_override as IRQ name, as it is not guaranteed to point
>>> to a valid string; use NULL instead (which makes the devm IRQ helpers
>>> use dev_name()).
>>>
>>> Fixes: 8412b410fa5e ("hwmon: Support ADI Fan Control IP")
>>> Signed-off-by: Danilo Krummrich <dakr@kernel.org>
>>> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
>>
>> Applied.
>
> I need this patch in the driver-core tree, otherwise I can't land patch 4 of
> this series [1]. :(
>
> Any chance you can drop it from your tree?
>
> [1] https://lore.kernel.org/driver-core/20260303115720.48783-5-dakr@kernel.org/
>
Sure, I'll drop it. Please add
Acked-by: Guenter Roeck <linux@roeck-us.net>
Thanks,
Guenter
On Tue Mar 3, 2026 at 5:57 PM CET, Guenter Roeck wrote:
> On 3/3/26 08:25, Danilo Krummrich wrote:
>> On Tue Mar 3, 2026 at 5:23 PM CET, Guenter Roeck wrote:
>>> On Tue, Mar 03, 2026 at 12:53:20PM +0100, Danilo Krummrich wrote:
>>>> Do not use driver_override as IRQ name, as it is not guaranteed to point
>>>> to a valid string; use NULL instead (which makes the devm IRQ helpers
>>>> use dev_name()).
>>>>
>>>> Fixes: 8412b410fa5e ("hwmon: Support ADI Fan Control IP")
>>>> Signed-off-by: Danilo Krummrich <dakr@kernel.org>
>>>> Reviewed-by: Nuno Sá <nuno.sa@analog.com>
>>>
>>> Applied.
>>
>> I need this patch in the driver-core tree, otherwise I can't land patch 4 of
>> this series [1]. :(
>>
>> Any chance you can drop it from your tree?
>>
>> [1] https://lore.kernel.org/driver-core/20260303115720.48783-5-dakr@kernel.org/
>>
>
> Sure, I'll drop it. Please add
>
> Acked-by: Guenter Roeck <linux@roeck-us.net>
Thanks!
On Tue, 2026-03-03 at 12:53 +0100, Danilo Krummrich wrote:
> Do not use driver_override as IRQ name, as it is not guaranteed to point
> to a valid string; use NULL instead (which makes the devm IRQ helpers
> use dev_name()).
>
> Fixes: 8412b410fa5e ("hwmon: Support ADI Fan Control IP")
> Signed-off-by: Danilo Krummrich <dakr@kernel.org>
> ---
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
> drivers/hwmon/axi-fan-control.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/axi-fan-control.c b/drivers/hwmon/axi-fan-control.c
> index b7bb325c3ad9..01590dfa55e6 100644
> --- a/drivers/hwmon/axi-fan-control.c
> +++ b/drivers/hwmon/axi-fan-control.c
> @@ -507,7 +507,7 @@ static int axi_fan_control_probe(struct platform_device *pdev)
> ret = devm_request_threaded_irq(&pdev->dev, ctl->irq, NULL,
> axi_fan_control_irq_handler,
> IRQF_ONESHOT | IRQF_TRIGGER_HIGH,
> - pdev->driver_override, ctl);
> + NULL, ctl);
> if (ret)
> return dev_err_probe(&pdev->dev, ret,
> "failed to request an irq\n");
© 2016 - 2026 Red Hat, Inc.