Fixed kernel version of load_driver_setting(): the lock was not properly

released under certain conditions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11298 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-02-09 17:56:21 +00:00
parent b885799ce7
commit 942d411b67

View File

@ -721,8 +721,10 @@ load_driver_settings(const char *driverName)
}
// we are allowed to call the driver settings pretty early in the boot process
if (kernel_startup)
if (kernel_startup) {
mutex_unlock(&sLock);
return NULL;
}
#endif // _KERNEL_MODE
#ifdef _BOOT_MODE
// see if we already have these settings loaded
@ -748,8 +750,12 @@ load_driver_settings(const char *driverName)
file = open(path, O_RDONLY);
}
if (file < B_OK)
if (file < B_OK) {
#ifdef _KERNEL_MODE
mutex_unlock(&sLock);
#endif
return NULL;
}
handle = load_driver_settings_from_file(file, driverName);