Skip to content
  • Alexander Motin's avatar
    bus: Cleanup device_probe_child() · f73c2bbf
    Alexander Motin authored
    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
    f73c2bbf