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
This commit is contained in:
John Baldwin 2024-10-16 14:08:49 -04:00
parent 42078dfb0f
commit 3342afcbaf

View File

@ -3405,9 +3405,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.