summaryrefslogtreecommitdiffstats
path: root/src/device/device_util.c
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2023-05-12 15:46:24 +0200
committerFelix Held <felix-coreboot@felixheld.de>2023-05-17 11:23:59 +0000
commit6a07db21b12b08c7b975921f2ee1196dd0ec92b3 (patch)
tree3b6fceda427aa70be42058500f337d39610bf09e /src/device/device_util.c
parentfeba51ba17b24e32fd9442310c05aaec2aa0de5f (diff)
downloadcoreboot-6a07db21b12b08c7b975921f2ee1196dd0ec92b3.tar.gz
coreboot-6a07db21b12b08c7b975921f2ee1196dd0ec92b3.tar.bz2
coreboot-6a07db21b12b08c7b975921f2ee1196dd0ec92b3.zip
console: Add format-checking __printf() to die()
Code changes are necessary because `-Wformat` warns about empty format strings by default. Change-Id: Ic8021b70f4cd4875b06f196f88b84940c9a79fe0 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75147 Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/device/device_util.c')
-rw-r--r--src/device/device_util.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/device/device_util.c b/src/device/device_util.c
index c5e03f20795f..b37d1d9bfc72 100644
--- a/src/device/device_util.c
+++ b/src/device/device_util.c
@@ -405,11 +405,8 @@ struct resource *find_resource(const struct device *dev, unsigned int index)
/* See if there is a resource with the appropriate index. */
resource = probe_resource(dev, index);
- if (!resource) {
- printk(BIOS_EMERG, "%s missing resource: %02x\n",
- dev_path(dev), index);
- die("");
- }
+ if (!resource)
+ die("%s missing resource: %02x\n", dev_path(dev), index);
return resource;
}