04.08.2021 18:34, Linus Walleij пишет:
+static void brcmf_fw_request_done_first(const struct firmware *fw, void *ctx)
{
struct brcmf_fw *fwctx = ctx;
+ struct brcmf_fw_item *first = &fwctx->req->items[0];
int ret;
+ /* Something failed with the first firmware request, such as not
+ * getting the per-board firmware. Retry this, now using the less
+ * specific path for the first firmware item, i.e. without the board
+ * suffix.
+ */
+ if (!fw && !fwctx->tested_board_variant) {
+ fwctx->tested_board_variant = true;
+ ret = request_firmware_nowait(THIS_MODULE, true, first->path,
+ fwctx->dev, GFP_KERNEL, fwctx,
+ brcmf_fw_request_done_first);
+ return;
The original code was proceeding on error. Is this a typo here?
if (!ret)
return;