Message ID | 20210917182226.3532898-4-mcgrof@kernel.org (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Johannes Berg |
Headers | show |
Series | firmware_loader: built-in API and make x86 use it | expand |
diff --git a/drivers/base/firmware_loader/main.c b/drivers/base/firmware_loader/main.c index eb4085b92ad4..d95b5fe5f700 100644 --- a/drivers/base/firmware_loader/main.c +++ b/drivers/base/firmware_loader/main.c @@ -115,6 +115,9 @@ static bool firmware_request_builtin(struct firmware *fw, const char *name) { struct builtin_fw *b_fw; + if (!fw) + return false; + for (b_fw = __start_builtin_fw; b_fw != __end_builtin_fw; b_fw++) { if (strcmp(name, b_fw->name) == 0) { fw->size = b_fw->size;