On Mon, Apr 14, 2025 at 11:56 AM Dmitry Antipov <dmantipov@xxxxxxxxx> wrote: > > On 4/14/25 12:22 PM, Arend van Spriel wrote: > > > When the platform_driver_probe() fails it means that brcmfmac_pdata will be NULL > > Hm. > > platform_driver_register() > -> probe (which is brcmf_common_pd_probe()) > ... > brcmfmac_pdata = dev_get_platdata(&pdev->dev); > ... > ... > if (!bus_for_each_dev(&platform_bus_type, NULL, &drv->driver, is_bound_to_driver)) { > retval = -ENODEV; > platform_driver_unregister(drv); [1] > } > > If we hit platform_driver_unregister() at [1], 'brcmfmac_pdata' is not NULL and, > if something goes wrong in brcmf_core_init() next, platform_driver_unregister() > may be called again. > > Shouldn't 'brcmf_common_pd_remove()' reset 'brcmfmac_data' back to NULL? Hi Dmitry, This one may have gone stale a bit. It showed up on my patchwork todo list which we setup last week. I agree that reset brcmfmac_data to NULL is needed. Regards, Arend
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature