[coreboot-gerrit] New patch to review for coreboot: kunimitsu: Remove incorrect dereferencing of pointer

Rizwan Qureshi (rizwan.qureshi@intel.com) gerrit at coreboot.org
Fri Sep 16 16:46:03 CEST 2016


Rizwan Qureshi (rizwan.qureshi at intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16612

-gerrit

commit 38fca4f17890133de5307fba4ac65931523e63fe
Author: Rizwan Qureshi <rizwan.qureshi at intel.com>
Date:   Fri Sep 16 19:45:08 2016 +0530

    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 at intel.com>
---
 src/mainboard/intel/kunimitsu/spd/spd_util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mainboard/intel/kunimitsu/spd/spd_util.c b/src/mainboard/intel/kunimitsu/spd/spd_util.c
index 0ce2acf..a17b519 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. */



More information about the coreboot-gerrit mailing list