[BUG] platform_get_irq_byname_optional -- dwc3-haps registers IRQ 0, WARN on first gadget init

From: Farhad Alemi

Date: Fri Aug 28 2026 - 01:34:40 EST


Hello,

As part of the kernel research at ASU's SEFCOM
lab, we hit the crash below. Crash reports can be found here:

https://github.com/farhad-alemi/public_bug_reports/tree/main/149-usb-dwc3-haps-registers-irq-0/

dwc3 dwc3.2.auto: Configuration mismatch. dr_mode forced to gadget
0 is an invalid IRQ number
WARNING: drivers/base/platform.c:492 at
platform_get_irq_byname_optional+0x1ed/0x220, CPU#1: repro/9498
Call Trace:
platform_get_irq_byname_optional+0x1ed/0x220
dwc3_gadget_init+0x607/0x2170
dwc3_core_init_mode+0x2f8/0x790
dwc3_core_probe+0x2345/0x2850
dwc3_probe+0x100/0x150
platform_probe+0xf9/0x190
really_probe+0x267/0xaf0
__driver_probe_device+0x1e2/0x350
driver_probe_device+0x4f/0x240
__device_attach_driver+0x270/0x410
bus_for_each_drv+0x258/0x2f0
__device_attach+0x2c5/0x450

Our reproducer.c is available upon request.

Happy to test a patch if that would help.

Regards,