]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite4e5712fbc4fdd29511a73aa6913ea44c5014b7d
tree816bca63c15160630c010a96caa1c35b6cc18b7b
parent9c2d6e6fc2e37eabd07b527fc12f192190dab0c3
drm/amdgpu: check for allocation failure in amdgpu_vkms_sw_init()

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

Fixes: 2bcc751ad32dad ("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