Em Wed, 8 Dec 2021 17:45:43 +0100 Robert Schlabbach <robert_s@xxxxxxx> escreveu: > > ret = si2157_load_firmware(fe, fw_name); > > if (ret) { > > + if (!fw_required) > > + goto skip_fw_download; > > + > > In conjunction with my proposal for PATCH 1/3, this can be simplified to: > > ret = si2157_load_firmware(fe, fw_name); > if (ret && fw_required) > goto err; See the patch 3: ret = si2157_load_firmware(fe, fw_name); + if (fw_required && ret == -ENOENT) + warn_firmware_not_loaded = true; + else if (ret < 0) { + dev_err(&client->dev, "error %d when loading firmware file '%s'\n", + ret, fw_name); Basically, it will do (about) the same thing you proposed, with one important difference: It should only ignore errors loading the firmware when the error is due to a non-existing firmware file. If the firmware file is corrupted or can't be load for other reasons (ENOMEM, corrupted file, etc), it will print the error code and bail out. Thanks, Mauro