From a92156e1cf9fbf530ddc964a2a8fcd8b3c38bc61 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Fri, 6 Jun 2008 20:36:23 +0000 Subject: [PATCH] Initialize the mutex before using it. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25830 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/drivers/input/usb_hid/Driver.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/add-ons/kernel/drivers/input/usb_hid/Driver.cpp b/src/add-ons/kernel/drivers/input/usb_hid/Driver.cpp index d4b59bd6bc..df351fd51d 100644 --- a/src/add-ons/kernel/drivers/input/usb_hid/Driver.cpp +++ b/src/add-ons/kernel/drivers/input/usb_hid/Driver.cpp @@ -226,6 +226,8 @@ init_driver() return B_NO_MEMORY; } + mutex_init(&sDriverLock, "usb hid driver lock"); + static usb_notify_hooks notifyHooks = { &usb_hid_device_added, &usb_hid_device_removed @@ -250,6 +252,7 @@ uninit_driver() put_module(B_USB_MODULE_NAME); delete gDeviceList; gDeviceList = NULL; + mutex_destroy(&sDriverLock); }