Date: Sun, 1 Dec 2024 04:57:46 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: a52372fc472a - stable/13 - bus_generic_detach: Remove redundant check Message-ID: <202412010457.4B14vkQP096873@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a52372fc472a98b2dbbfd92261713abe1c5cea13 commit a52372fc472a98b2dbbfd92261713abe1c5cea13 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2024-10-16 18:08:49 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2024-11-30 21:33:38 +0000 bus_generic_detach: Remove redundant check device_detach() checks the device state and only calls a driver's DEVICE_DETACH method if the device is attached but not busy. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D47156 (cherry picked from commit 3342afcbaf42c2e6a4604c84e267901411e790ca) --- sys/kern/subr_bus.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 1f490850579e..aec5b4c615fd 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -3839,9 +3839,6 @@ bus_generic_detach(device_t dev) device_t child; int error; - if (dev->state != DS_ATTACHED) - return (EBUSY); - /* * Detach children in the reverse order. * See bus_generic_suspend for details.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202412010457.4B14vkQP096873>