rem: if (file < B_OK)
add: if (file < B_OK) { #ifdef _KERNEL_MODE mutex_unlock(&sLock); #endif
context: load_driver_settings(const char *driverName){	settings_handle *handle;	int file;		if (driverName == NULL)		return NULL;#ifdef _KERNEL_MODE	// see if we already have these settings loaded	mutex_lock(&sLock);	handle = find_driver_settings(driverName);	if (handle != NULL) {		handle->ref_count++;		// we got it, now let's see if it already has been parsed		if (handle->magic != SETTINGS_MAGIC) {			handle->magic = SETTINGS_MAGIC;			if (parse_settings(handle) != B_OK) {				// no valid settings, let's cut down its memory requirements				free(handle->text);				handle->text = NULL;				handle = NULL;			}		}		mutex_unlock(&sLock);		return handle;	}	// we are allowed to call the driver settings pretty early in the boot process	if (kernel_startup)		return NULL;#endif	// _KERNEL_MODE#ifdef _BOOT_MODE	// see if we already have these settings loaded	{		struct driver_settings_file *settings = gKernelArgs.driver_settings;		while (settings != NULL) {			if (!strcmp(settings->name, driverName)) {				// we have it				return new_settings(settings->buffer, driverName);			}			settings = settings->next;		}	}#endif	// open the settings from the standardized location	{		char path[B_FILE_NAME_LENGTH + 64];		// ToDo: use the kernel's find_directory for this		strcpy(path, SETTINGS_DIRECTORY);		strlcat(path, driverName, sizeof(path));		file = open(path, O_RDONLY);	}	if (file < B_OK)		return NULL;	handle = load_driver_settings_from_file(file, driverName);#ifdef _KERNEL_MODE	if (handle != NULL)		list_add_item(&sHandles, handle);	mutex_unlock(&sLock);#endif	close(file);	return (void *)handle;}