summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorElyes Haouas <ehaouas@noos.fr>2022-09-13 10:16:01 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-09-15 13:02:53 +0000
commit6a8029c2c93d51916ae9f424da2b4da38a838b75 (patch)
treec554a967cc40d3610b8c6f1011fbfa91c375ab53 /src/soc
parentaebccac7e10eb581e8e7d3354289cfed76860a3e (diff)
soc/intel/meteorlake: Use "if (!ptr)" in preference to "if (ptr == NULL)"
Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Change-Id: Ia2508abe62a194f2921d5535937ba82a60967ca3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/67612 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subratabanik@google.com>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/meteorlake/fsp_params.c2
-rw-r--r--src/soc/intel/meteorlake/romstage/romstage.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/soc/intel/meteorlake/fsp_params.c b/src/soc/intel/meteorlake/fsp_params.c
index 3e8d22e15a..e3c85600a1 100644
--- a/src/soc/intel/meteorlake/fsp_params.c
+++ b/src/soc/intel/meteorlake/fsp_params.c
@@ -126,7 +126,7 @@ static void fill_fsps_cpu_params(FSP_S_CONFIG *s_cfg,
/* Locate microcode and pass to FSP-S for 2nd microcode loading */
microcode_file = cbfs_map("cpu_microcode_blob.bin", &microcode_len);
- if ((microcode_file != NULL) && (microcode_len != 0)) {
+ if ((microcode_file) && (microcode_len != 0)) {
/* Update CPU Microcode patch base address/size */
s_cfg->MicrocodeRegionBase = (uint32_t)microcode_file;
s_cfg->MicrocodeRegionSize = (uint32_t)microcode_len;
diff --git a/src/soc/intel/meteorlake/romstage/romstage.c b/src/soc/intel/meteorlake/romstage/romstage.c
index 2ac5021b42..2d3b14415e 100644
--- a/src/soc/intel/meteorlake/romstage/romstage.c
+++ b/src/soc/intel/meteorlake/romstage/romstage.c
@@ -43,7 +43,7 @@ static void save_dimm_info(void)
meminfo_hob = fsp_find_extension_hob_by_guid(
smbios_memory_info_guid,
&hob_size);
- if (meminfo_hob == NULL || hob_size == 0) {
+ if (!meminfo_hob || hob_size == 0) {
printk(BIOS_ERR, "SMBIOS MEMORY_INFO_DATA_HOB not found\n");
return;
}
@@ -53,7 +53,7 @@ static void save_dimm_info(void)
* table 17
*/
mem_info = cbmem_add(CBMEM_ID_MEMINFO, sizeof(*mem_info));
- if (mem_info == NULL) {
+ if (!mem_info) {
printk(BIOS_ERR, "CBMEM entry for DIMM info missing\n");
return;
}