Re: [PATCH] wifi: rtw88: Unregister all hardware state when PCI IRQ setup fails
From: Ping-Ke Shih
Date: Sat Dec 05 2026 - 22:28:32 EST
Shuo Qin <23159100078@xxxxxxxxxxxxxxxxx> wrote:
> rtw_register_hw() registers the LED class device and creates debugfs
> entries as well as registering the mac80211 hardware. If the following
> IRQ request fails, rtw_pci_probe() only calls ieee80211_unregister_hw()
> before freeing the hardware and its private driver state.
>
> The LED remains registered with callbacks that access the freed rtw_dev.
> Use rtw_unregister_hw() to undo the complete registration, including the
> LED and debugfs state, before releasing the allocation.
>
> Fixes: 4b6652bc6d8d ("wifi: rtw88: Add support for LED blinking")
> Cc: stable@xxxxxxxxxxxxxxx
> Co-developed-by: Bin Yu <byu@xxxxxxxxxxxxx>
> Signed-off-by: Bin Yu <byu@xxxxxxxxxxxxx>
> Co-developed-by: Cheng Wen <wencheng@xxxxxxxxxxxxx>
> Signed-off-by: Cheng Wen <wencheng@xxxxxxxxxxxxx>
> Signed-off-by: Shuo Qin <23159100078@xxxxxxxxxxxxxxxxx>
> Reviewed-by: Luka Gejak <luka.gejak@xxxxxxxxx>
1 patch(es) applied to rtw-next branch of rtw.git, thanks.
265bdecae192 wifi: rtw88: Unregister all hardware state when PCI IRQ setup fails
---
https://github.com/pkshih/rtw.git