Search Linux Wireless

Re: [PATCH v2] brcmfmac: firmware: Fix firmware loading

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

 



05.08.2021 12:27, Linus Walleij пишет:
>>> +     } else {
>>> +             fwctx->tested_board_variant = true;
>>>               ret = request_firmware_nowait(THIS_MODULE, true, first->path,
>>>                                             fwctx->dev, GFP_KERNEL, fwctx,
>>> -                                           brcmf_fw_request_done);
>>> +                                           brcmf_fw_request_done_first);
>>>       }
>>>       if (ret < 0)
>>> -             brcmf_fw_request_done(NULL, fwctx);
>>> +             brcmf_fw_request_done_first(NULL, fwctx);
>> This "else" can be replaced with:
>>
>> if (!alt_path || ret < 0)
>>         brcmf_fw_request_done(NULL, fwctx);
> Sorry I don't quite get this... both branches of the if/else clause will
> assign ret also if alt_path is set request_firmware_nowait() can return
> nonzero and then brcmf_fw_request_done() needs to get
> called?

That call will request the first->path from brcmf_fw_request_done()
since fw=NULL and fwctx->tested_board_variant=false. Hence the "else"
branch can be omitted.



[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