Thread (10 messages) flat view 10 messages, 2 authors, 2021-08-05

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

From: Dmitry Osipenko <digetx@gmail.com>
Date: 2021-08-05 10:10:23

05.08.2021 12:27, Linus Walleij пишет:
quoted
quoted
+     } 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help