From 5e6b0f0cac4ba5cde6114325ea69ec0e98c7e08f Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Tue, 13 Sep 2022 09:55:49 +0200 Subject: nb/intel: Use "if (!ptr)" in preference to "if (ptr == NULL)" Signed-off-by: Elyes Haouas Change-Id: I6d0d945011fa046b974c6f4554cb9fb15e523afb Reviewed-on: https://review.coreboot.org/c/coreboot/+/67578 Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/northbridge/intel/x4x/northbridge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/northbridge/intel/x4x') diff --git a/src/northbridge/intel/x4x/northbridge.c b/src/northbridge/intel/x4x/northbridge.c index 015e0ac658..cdf43c95e6 100644 --- a/src/northbridge/intel/x4x/northbridge.c +++ b/src/northbridge/intel/x4x/northbridge.c @@ -138,7 +138,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); -- cgit v1.2.3