Fix missing mutex_unlock() in case of opening an already removed device.
Spotted by Mika Lindqvist, thanks! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28957 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -867,8 +867,10 @@ usb_disk_open(const char *name, uint32 flags, void **cookie)
|
|||||||
device_lun *lun = device->luns[i];
|
device_lun *lun = device->luns[i];
|
||||||
if (strncmp(rawName, lun->name, 32) == 0) {
|
if (strncmp(rawName, lun->name, 32) == 0) {
|
||||||
// found the matching device/lun
|
// found the matching device/lun
|
||||||
if (device->removed)
|
if (device->removed) {
|
||||||
|
mutex_unlock(&gDeviceListLock);
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
device->open_count++;
|
device->open_count++;
|
||||||
*cookie = lun;
|
*cookie = lun;
|
||||||
|
|||||||
Reference in New Issue
Block a user