if_free not called on (some?) attach failures
|Reported by:||bga||Owned by:||bga|
|Has a Patch:||no||Platform:||All|
If during attach() a device for some reason fails to initialize, there are cases where gDeviceCount will not be decremented (specially when using iflib) as the place where this happens currently is never called in that case. So even if the device is not successfully initialized, the driver is not unloaded and the /dev entry still hangs around.
We probably want to move the handling to a higher abstraction or simply remove it (it is not obvious to me if it is used outside the compatibility layer).