summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/amd/amdkfd/kfd_events.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/drm/amd/amdkfd/kfd_events.c')
-rw-r--r--sys/dev/pci/drm/amd/amdkfd/kfd_events.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/amd/amdkfd/kfd_events.c b/sys/dev/pci/drm/amd/amdkfd/kfd_events.c
index 3eea4edee35..b8bdd796cd9 100644
--- a/sys/dev/pci/drm/amd/amdkfd/kfd_events.c
+++ b/sys/dev/pci/drm/amd/amdkfd/kfd_events.c
@@ -531,6 +531,8 @@ static struct kfd_event_waiter *alloc_event_waiters(uint32_t num_events)
event_waiters = kmalloc_array(num_events,
sizeof(struct kfd_event_waiter),
GFP_KERNEL);
+ if (!event_waiters)
+ return NULL;
for (i = 0; (event_waiters) && (i < num_events) ; i++) {
init_wait(&event_waiters[i].wait);