aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/vmware/vmci/vmci_event.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/vmware/vmci/vmci_event.c')
-rw-r--r--sys/dev/vmware/vmci/vmci_event.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/vmware/vmci/vmci_event.c b/sys/dev/vmware/vmci/vmci_event.c
index 9a932340a7b6..c34ff113978b 100644
--- a/sys/dev/vmware/vmci/vmci_event.c
+++ b/sys/dev/vmware/vmci/vmci_event.c
@@ -594,6 +594,9 @@ vmci_event_unregister_subscription(vmci_id sub_id)
{
struct vmci_subscription *s;
+ if (!vmci_initialized_lock(&subscriber_lock))
+ return NULL;
+
vmci_grab_lock_bh(&subscriber_lock);
s = vmci_event_find(sub_id);
if (s != NULL) {