summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2023-07-27 10:16:20 +0300
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-08-03 10:21:02 +0300
commitdae236924ca070fc5ab2aa035f13972191330b4f (patch)
tree550fd7cf5515440e73a4be8a9d5b9ddf4e9c33e0 /lib
parent1b7e469a66521d90b6f51fe0a27abada664471ba (diff)
downloadu-boot-dae236924ca070fc5ab2aa035f13972191330b4f.tar.xz
efi_loader: fix an IS_ERR() vs NULL check
The efi_parse_pkcs7_header() function returns NULL on error so the check for IS_ERR() should be changed to a NULL check. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_capsule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c
index ddf8153e09..af8a2ee940 100644
--- a/lib/efi_loader/efi_capsule.c
+++ b/lib/efi_loader/efi_capsule.c
@@ -368,9 +368,8 @@ efi_status_t efi_capsule_authenticate(const void *capsule, efi_uintn_t capsule_s
auth_hdr->auth_info.hdr.dwLength
- sizeof(auth_hdr->auth_info),
&buf);
- if (IS_ERR(capsule_sig)) {
+ if (!capsule_sig) {
debug("Parsing variable's pkcs7 header failed\n");
- capsule_sig = NULL;
goto out;
}