drm/amdkfd: Check for potential null return of kmalloc_array()
authorQintaoShen <unSimple1993@163.com>
Thu, 24 Mar 2022 08:26:23 +0000 (16:26 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 25 Mar 2022 16:40:25 +0000 (12:40 -0400)
commitebbb7bb9e80305820dc2328a371c1b35679f2667
tree0f793acb076ecbc42122c312b233b7cb3f936f3a
parent6ea239adc2a712eb318f04f5c29b018ba65ea38a
drm/amdkfd: Check for potential null return of kmalloc_array()

As the kmalloc_array() may return null, the 'event_waiters[i].wait' would lead to null-pointer dereference.
Therefore, it is better to check the return value of kmalloc_array() to avoid this confusion.

Signed-off-by: QintaoShen <unSimple1993@163.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_events.c