Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 4594baa in mainline


Ignore:
Timestamp:
2017-10-22T16:38:00Z (3 years ago)
Author:
Petr Manek <petr.manek@…>
Branches:
master
Children:
ee794529
Parents:
a4e26882
Message:

Prevented possible deadlock during endpoint release.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/usbhost/src/bus.c

    ra4e26882 r4594baa  
    182182int bus_release_endpoint(bus_t *bus, endpoint_t *ep)
    183183{
    184         int err;
    185 
    186184        assert(bus);
    187185        assert(ep);
    188186
    189187        fibril_mutex_lock(&bus->guard);
    190         if ((err = bus->ops.release_endpoint(bus, ep)))
    191                 return err;
    192         fibril_mutex_unlock(&bus->guard);
     188        const int r = bus->ops.release_endpoint(bus, ep);
     189        fibril_mutex_unlock(&bus->guard);
     190
     191        if (r)
     192                return r;
    193193
    194194        /* Bus reference */
Note: See TracChangeset for help on using the changeset viewer.