Remove unnecessary null check from toc0_verify_cert_item()
because the array digest is always not null.
Change-Id: I0d7f464a6528d89824b533a4224a62113d005291
Ref: https://patchwork.ozlabs.org/project/uboot/patch/
20240801010100.21009-1-sw0312.kim@samsung.com/
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
/* If a digest was provided, compare it to the embedded digest. */
extension = &totalSequence->mainSequence.explicit3.extension;
- if (digest && memcmp(&extension->digest, digest, SHA256_DIGEST_LENGTH)) {
+ if (memcmp(&extension->digest, digest, SHA256_DIGEST_LENGTH)) {
pr_err("Wrong firmware digest in certificate\n");
goto err;
}