From c167b748686529fa9f9c667f57cba6519220b341 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Wed, 3 Nov 2021 13:25:02 +0100 Subject: superio: Replace bad uses of `find_resource` The `find_resource` function will never return null (will die instead). In cases where the existing code already accounts for null pointers, it is better to use `probe_resource` instead, which returns a null pointer instead of dying. Change-Id: Ic6e28add78f686fc9ab4556eddbedf7828fba9ef Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/58909 Tested-by: build bot (Jenkins) Reviewed-by: Werner Zeh --- src/superio/ite/it8613e/superio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/superio/ite/it8613e') diff --git a/src/superio/ite/it8613e/superio.c b/src/superio/ite/it8613e/superio.c index 4d12457e0d..c18c3ec357 100644 --- a/src/superio/ite/it8613e/superio.c +++ b/src/superio/ite/it8613e/superio.c @@ -19,7 +19,7 @@ static void it8613e_init(struct device *dev) switch (dev->path.pnp.device) { case IT8613E_EC: - res = find_resource(dev, PNP_IDX_IO0); + res = probe_resource(dev, PNP_IDX_IO0); if (!conf || !res) break; ite_ec_init(res->base, &conf->ec); -- cgit v1.2.3