drm/amdgpu: check for allocation failure in amdgpu_vkms_sw_init()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 6 Aug 2021 15:05:18 +0000 (18:05 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 6 Aug 2021 20:12:23 +0000 (16:12 -0400)
commit420c81c84b596984e0afb6e8b884dc67ddfa13f6
tree816bca63c15160630c010a96caa1c35b6cc18b7b
parent1b41d67ec9612b30aaa2ef3848d86a708eceb2cf
drm/amdgpu: check for allocation failure in amdgpu_vkms_sw_init()

Check whether the kcalloc() fails and return -ENOMEM if it does.

Fixes: 84ec374bd58036 ("drm/amdgpu: create amdgpu_vkms (v4)")
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c