Ondřej Jirman <megi@xff.cz> wrote:
>
> This is a series of patches requested by Ping-Ke Shih in response to
> https://lore.kernel.org/lkml/20250427002414.410791-1-megi@xff.cz/
>
> Please take a look.
>
> (hw->wiphy->bands[*] are no longer being NULLed when probe fails and on
> remove(), but I guess that should not be an issue? I tried unbinding the
> device and it worked fine without any crash)
The original code set bands[] to NULL, because the error path could call
free function twice, so set NULL to prevent double free. After using
devm_ series, it becomes unnecessary.