util/ifdtool: Add NULL check for pointer fpsba

This patch adds NULL check inside get_ifd_version_from_fcba()
function to fix Klocwork issue.

BUG=b:153888802

Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Change-Id: I525054376b36c658b93760b185ef6dd170f5aea9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45130
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
Subrata Banik 2020-09-06 18:50:14 +05:30 committed by Patrick Georgi
parent 5bb89e7f0c
commit 60296aec76
1 changed files with 1 additions and 1 deletions

View File

@ -265,7 +265,7 @@ static int get_ifd_version_from_fcba(char *image, int size)
const fcba_t *fcba = find_fcba(image, size);
const fdbar_t *fdb = find_fd(image, size);
const fpsba_t *fpsba = find_fpsba(image, size);
if (!fcba || !fdb)
if (!fcba || !fdb || !fpsba)
exit(EXIT_FAILURE);
chipset = guess_ich_chipset(fdb, fpsba);