Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e728eb91 authored by Elliott Hughes's avatar Elliott Hughes Committed by Gerrit Code Review
Browse files

Merge "Get fastboot working on OS X"

parents 9a995b2c 81c24f6f
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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);
    }