darwin: only attempt to auto-detach driver is one is active
authorNathan Hjelm <hjelmn@google.com>
Thu, 22 Jul 2021 05:12:19 +0000 (23:12 -0600)
committerNathan Hjelm <hjelmn@cs.unm.edu>
Thu, 22 Jul 2021 12:22:35 +0000 (06:22 -0600)
commitd2522b3a4a88f42b7719db68260700c215bc8148
treeff6349bbaf859196222ed926696f45e6347199a3
parentf8dc6af91607d5d2202c47b3b62e107df9197184
darwin: only attempt to auto-detach driver is one is active

This commit improves the auto-detach code so that it doesn't attempt to detach a kernel
driver if none exists. This will avoid extra info/warning output on the failed detach.

Closes #960

Signed-off-by: Nathan Hjelm <hjelmn@google.com>
libusb/os/darwin_usb.c
libusb/version_nano.h