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

Changeset b8ab299 in mainline


Ignore:
Timestamp:
2018-01-29T01:33:06Z (4 years ago)
Author:
Aearsis <Hlavaty.Ondrej@…>
Branches:
lfn, master, serial
Children:
07457d6
Parents:
133ff9d
git-author:
Ondřej Hlavatý <aearsis@…> (2018-01-29 01:32:22)
git-committer:
Aearsis <Hlavaty.Ondrej@…> (2018-01-29 01:33:06)
Message:

libdrv: when the device is freed, it must be also removed from the list

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/driver.c

    r133ff9d rb8ab299  
    196196                rc = ENOTSUP;
    197197       
    198         if (rc == EOK)
     198        if (rc == EOK) {
     199                fibril_mutex_lock(&devices_mutex);
     200                list_remove(&dev->link);
     201                fibril_mutex_unlock(&devices_mutex);
    199202                dev_del_ref(dev);
     203        }
    200204       
    201205        dev_del_ref(dev);
     
    225229                rc = ENOTSUP;
    226230       
    227         if (rc == EOK)
     231        if (rc == EOK) {
     232                fibril_mutex_lock(&devices_mutex);
     233                list_remove(&dev->link);
     234                fibril_mutex_unlock(&devices_mutex);
    228235                dev_del_ref(dev);
     236        }
    229237       
    230238        dev_del_ref(dev);
Note: See TracChangeset for help on using the changeset viewer.