Re: [PATCH] wifi: rtw88: Unregister all hardware state when PCI IRQ setup fails

From: Luka Gejak

Date: Sat Dec 05 2026 - 11:13:55 EST


Hi Shuo,

The prefered prefix for rtw next related patches is [PATCH rtw-next]
instead of plain [PATCH]. I do not think it is worth sending v2 for this,
but keep it in mind for future submissions.

December 5, 2026 at 10:54 AM, "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>
> ---

Looks good to me,

Reviewed-by: Luka Gejak <luka.gejak@xxxxxxxxx>

Best regards,
Luka Gejak