mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-26 20:12:44 +00:00
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:
parent
42078dfb0f
commit
3342afcbaf
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user