Skip to contentSkip to conversation

pinctrl: at91-pio4: fix domain name assignment

PATCH In review Johan Hovold 3 participants 3 messages Feb 24, 2023 – Mar 6, 2023

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: at91-pio4: fix domain name assignment

Since commit d59f6617eef0 ("genirq: Allow fwnode to carry name information only") an IRQ domain is always given a name during allocation (e.g. used for the debugfs entry).

Drop the no longer valid name assignment, which would lead to an attempt to free a string constant when removing the domain on late probe failures (e.g. probe deferral).

Fixes d59f6617eef0 ("genirq: Allow fwnode to carry name information only")
---
 drivers/pinctrl/pinctrl-at91-pio4.c | 1 -
 1 file changed, 1 deletion(-)
drivers/pinctrl/pinctrl-at91-pio4.c +0 -1
index 39b233f73e13..d699588677a5 100644
@@ -1206,7 +1206,6 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)
 		dev_err(dev, "can't add the irq domain\n");
 		return -ENODEV;
 	}
-	atmel_pioctrl->irq_domain->name = "atmel gpio";
 
 	for (i = 0; i < atmel_pioctrl->npins; i++) {
 		int irq = irq_create_mapping(atmel_pioctrl->irq_domain, i);
Signature · 1 line
2.39.2
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 6 lines · Johan Hovold

EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe

Since commit d59f6617eef0 ("genirq: Allow fwnode to carry name information only") an IRQ domain is always given a name during allocation (e.g. used for the debugfs entry).

Quoted 7 lines

Drop the no longer valid name assignment, which would lead to an attempt to free a string constant when removing the domain on late probe failures (e.g. probe deferral).

Fixes d59f6617eef0 ("genirq: Allow fwnode to carry name information only")
Quoted 19 lines
---
 drivers/pinctrl/pinctrl-at91-pio4.c | 1 -
 1 file changed, 1 deletion(-)
drivers/pinctrl/pinctrl-at91-pio4.c +0 -2
index 39b233f73e13..d699588677a5 100644
@@ -1206,7 +1206,6 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)
                dev_err(dev, "can't add the irq domain\n");
                return -ENODEV;
        }
-       atmel_pioctrl->irq_domain->name = "atmel gpio";
 
        for (i = 0; i < atmel_pioctrl->npins; i++) {
                int irq = irq_create_mapping(atmel_pioctrl->irq_domain, i);
--

2.39.2

#2 lore raw
In reply to Johan Hovold
Quoted 11 lines · Johan Hovold

Since commit d59f6617eef0 ("genirq: Allow fwnode to carry name information only") an IRQ domain is always given a name during allocation (e.g. used for the debugfs entry).

Drop the no longer valid name assignment, which would lead to an attempt to free a string constant when removing the domain on late probe failures (e.g. probe deferral).

Fixes d59f6617eef0 ("genirq: Allow fwnode to carry name information only")

Thanks Johan, patch applied for fixes.

Yours,
Linus Walleij