Fixed condition check based on klocwork scan (#442)

Fixed condition check based on KW report

Signed-off-by: Ravi Rangarajan <ravi.p.rangarajan@intel.com>
This commit is contained in:
Ravi Rangarajan
2019-11-06 17:51:02 -07:00
committed by Aiden Park
parent a218222928
commit 13974ee2d4
+1 -1
View File
@@ -1082,7 +1082,7 @@ FindImage (
// If capsule header is NULL or no payloads found in the capsule
// return EFI_NOT_FOUND;
//
if ((CapHeader != NULL) && (CapHeader->PayloadItemCount == 0)) {
if ((CapHeader == NULL) || (CapHeader->PayloadItemCount == 0)) {
return EFI_NOT_FOUND;
}