Search Linux Wireless

Re: [PATCH] wifi: brcmfmac: avoid calling platform_driver_unregister() more than once

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

Dmitry





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux