Merge "Get fastboot working on OS X"
This commit is contained in:
commit
e728eb9150
1 changed files with 11 additions and 0 deletions
|
@ -293,6 +293,13 @@ static int try_device(io_service_t device, usb_handle *handle) {
|
|||
|
||||
// So, we have a device, finally. Grab its vitals.
|
||||
|
||||
|
||||
kr = (*dev)->USBDeviceOpen(dev);
|
||||
if (kr != 0) {
|
||||
WARN("USBDeviceOpen");
|
||||
goto out;
|
||||
}
|
||||
|
||||
kr = (*dev)->GetDeviceVendor(dev, &handle->info.dev_vendor);
|
||||
if (kr != 0) {
|
||||
ERR("GetDeviceVendor");
|
||||
|
@ -365,12 +372,16 @@ static int try_device(io_service_t device, usb_handle *handle) {
|
|||
goto error;
|
||||
}
|
||||
|
||||
out:
|
||||
|
||||
(*dev)->USBDeviceClose(dev);
|
||||
(*dev)->Release(dev);
|
||||
return 0;
|
||||
|
||||
error:
|
||||
|
||||
if (dev != NULL) {
|
||||
(*dev)->USBDeviceClose(dev);
|
||||
(*dev)->Release(dev);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue