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/gm45 | |
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/gm45')
-rw-r--r-- | src/northbridge/intel/gm45/gma.c | 2 | ||||
-rw-r--r-- | src/northbridge/intel/gm45/northbridge.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/northbridge/intel/gm45/gma.c b/src/northbridge/intel/gm45/gma.c index 79b366f885..7df9106f2f 100644 --- a/src/northbridge/intel/gm45/gma.c +++ b/src/northbridge/intel/gm45/gma.c @@ -152,7 +152,7 @@ static void gma_func0_init(struct device *dev) intel_gma_init_igd_opregion(); gtt_res = probe_resource(dev, PCI_BASE_ADDRESS_0); - if (gtt_res == NULL) + if (!gtt_res) return; mmio = res2mmio(gtt_res, 0, 0); diff --git a/src/northbridge/intel/gm45/northbridge.c b/src/northbridge/intel/gm45/northbridge.c index f41adf32be..1078748de6 100644 --- a/src/northbridge/intel/gm45/northbridge.c +++ b/src/northbridge/intel/gm45/northbridge.c @@ -174,7 +174,7 @@ void northbridge_write_smram(u8 smram) { struct device *dev = pcidev_on_root(0, 0); - if (dev == NULL) + if (!dev) die("could not find pci 00:00.0!\n"); pci_write_config8(dev, D0F0_SMRAM, smram); |