HomeFreeBSD

bus: Cleanup device_probe_child()

Description

bus: Cleanup device_probe_child()

When device driver probe method returns 0, i.e. absolute priority, do
not remove its class from the device just to set it back few lines
later, that may change the device unit number, etc. and after which
we'd better call the probe again.

If during search we found some driver with absolute priority, we do
not need to set device driver and class since we haven't removed them
before.

It should not happen, but if second probe method call failed, remove
the driver and possibly the class from the device as it was when we
started.

Reviewed by: imp, jhb
Differential Revision: https://reviews.freebsd.org/D32125

Details

Provenance
mavAuthored on Sep 25 2021, 12:27 AM
Reviewer
imp
Differential Revision
D32125: bus: Cleanup device_probe_child()
Parents
rGe725ee7eb672: mount: add libxo(3) support
Branches
Unknown
Tags
Unknown