diff options
author | Rizwan Qureshi <rizwan.qureshi@intel.com> | 2016-09-16 19:45:08 +0530 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2016-09-19 19:31:32 +0200 |
commit | c33f08b6724f8567c5ccea546f57775f264974a9 (patch) | |
tree | e6d469a63e3149c9df8e955dea3cc2b2afee42e2 /src | |
parent | 0b1a5c259b92ce6685577af631c2b76134514eab (diff) |
kunimitsu: Remove incorrect dereferencing of pointer
In spd_util.c function mainboard_get_spd_data(), spd_file can
either be NULL or will point to the first byte of the SPD data,
and should not be dereferenced.
Change-Id: I08677976792682cc744ec509dd183eadf5e570a5
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/16612
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/intel/kunimitsu/spd/spd_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mainboard/intel/kunimitsu/spd/spd_util.c b/src/mainboard/intel/kunimitsu/spd/spd_util.c index 0ce2acf6ff..a17b519919 100644 --- a/src/mainboard/intel/kunimitsu/spd/spd_util.c +++ b/src/mainboard/intel/kunimitsu/spd/spd_util.c @@ -85,7 +85,7 @@ uintptr_t mainboard_get_spd_data(void) /* Load SPD data from CBFS */ spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD, &spd_file_len); - if (!(*spd_file)) + if (!spd_file) die("SPD data not found."); /* make sure we have at least one SPD in the file. */ |