Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 May 2022 23:42:23 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: ac56d90a49c5 - main - ipmi: Use devclass_find to lookup ipmi devclass in ipmi_unload.
Message-ID:  <202205052342.245NgNgS055550@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=ac56d90a49c500649319b4926f324540a443f383

commit ac56d90a49c500649319b4926f324540a443f383
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-05-05 23:34:33 +0000
Commit:     John Baldwin <jhb@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]);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202205052342.245NgNgS055550>