summaryrefslogtreecommitdiff
path: root/src/superio/ite/it8783ef
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-11-03 13:25:02 +0100
committerFelix Held <felix-coreboot@felixheld.de>2021-11-04 17:36:32 +0000
commitc167b748686529fa9f9c667f57cba6519220b341 (patch)
tree6b00bafa689344290da8875b42b50501469044e4 /src/superio/ite/it8783ef
parente058841913f8374dfa511f56504e21659c46769e (diff)
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 <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/58909 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Diffstat (limited to 'src/superio/ite/it8783ef')
-rw-r--r--src/superio/ite/it8783ef/superio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/superio/ite/it8783ef/superio.c b/src/superio/ite/it8783ef/superio.c
index feb373f709..d90ae5f3b7 100644
--- a/src/superio/ite/it8783ef/superio.c
+++ b/src/superio/ite/it8783ef/superio.c
@@ -20,7 +20,7 @@ static void it8783ef_init(struct device *const dev)
switch (dev->path.pnp.device) {
case IT8783EF_EC:
conf = dev->chip_info;
- 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);