diff options
author | Elyes Haouas <ehaouas@noos.fr> | 2022-09-13 09:55:49 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-09-14 12:01:24 +0000 |
commit | 5e6b0f0cac4ba5cde6114325ea69ec0e98c7e08f (patch) | |
tree | 06433b2873415812ac1fb28c51819cd89e4caa74 /src/northbridge/intel/sandybridge | |
parent | 1fac2e20b8161e1dc93086b4c5498548827f1604 (diff) |
nb/intel: Use "if (!ptr)" in preference to "if (ptr == NULL)"
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I6d0d945011fa046b974c6f4554cb9fb15e523afb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67578
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/northbridge/intel/sandybridge')
-rw-r--r-- | src/northbridge/intel/sandybridge/raminit.c | 2 | ||||
-rw-r--r-- | src/northbridge/intel/sandybridge/raminit_mrc.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/northbridge/intel/sandybridge/raminit.c b/src/northbridge/intel/sandybridge/raminit.c index 9082f8a7d3..5044512ead 100644 --- a/src/northbridge/intel/sandybridge/raminit.c +++ b/src/northbridge/intel/sandybridge/raminit.c @@ -107,7 +107,7 @@ static void setup_sdram_meminfo(ramctr_timing *ctrl) /* The 'spd_add_smbios17' function allocates this CBMEM area */ struct memory_info *m = cbmem_find(CBMEM_ID_MEMINFO); - if (m == NULL) + if (!m) return; const uint32_t capid0_a = pci_read_config32(HOST_BRIDGE, CAPID0_A); diff --git a/src/northbridge/intel/sandybridge/raminit_mrc.c b/src/northbridge/intel/sandybridge/raminit_mrc.c index c276d4c609..a308d07305 100644 --- a/src/northbridge/intel/sandybridge/raminit_mrc.c +++ b/src/northbridge/intel/sandybridge/raminit_mrc.c @@ -111,7 +111,7 @@ static void prepare_mrc_cache(struct pei_data *pei_data) pei_data->mrc_input = mrc_cache_current_mmap_leak(MRC_TRAINING_DATA, MRC_CACHE_VERSION, &mrc_size); - if (pei_data->mrc_input == NULL) { + if (!pei_data->mrc_input) { /* Error message printed in find_current_mrc_cache */ return; } |