The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ac56d90a49c500649319b4926f324540a443f383
commit ac56d90a49c500649319b4926f324540a443f383 Author: John Baldwin <j...@freebsd.org> AuthorDate: 2022-05-05 23:34:33 +0000 Commit: John Baldwin <j...@freebsd.org> CommitDate: 2022-05-05 23:34:33 +0000 ipmi: Use devclass_find to lookup ipmi devclass in ipmi_unload. Differential Revision: https://reviews.freebsd.org/D35061 --- sys/dev/ipmi/ipmi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/ipmi/ipmi.c b/sys/dev/ipmi/ipmi.c index 3a9fb80fc208..3427c36ba615 100644 --- a/sys/dev/ipmi/ipmi.c +++ b/sys/dev/ipmi/ipmi.c @@ -1070,9 +1070,7 @@ ipmi_unload(void *arg) int count; int i; - if (ipmi_devclass == NULL) - return; - if (devclass_get_devices(ipmi_devclass, &devs, &count) != 0) + if (devclass_get_devices(devclass_find("ipmi"), &devs, &count) != 0) return; for (i = 0; i < count; i++) device_delete_child(device_get_parent(devs[i]), devs[i]);