amdkfd: Check kvmalloc return before memcpy
authorKent Russell <kent.russell@amd.com>
Mon, 2 Nov 2020 16:17:59 +0000 (11:17 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 2 Nov 2020 20:33:33 +0000 (15:33 -0500)
commit9d17df77bcfaef59e99586c4db8ef38b4bfe46ea
tree4d7cd44e6674d284a911f86af43db56c52493227
parent4dbcdc9cada2fd5cc05e1678213896059a097660
amdkfd: Check kvmalloc return before memcpy

If we can't kvmalloc the pcrat_image, then we shouldn't memcpy

Signed-off-by: Kent Russell <kent.russell@amd.com>
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_crat.c