OSDN Git Service

amdgpu: Cleanly handle ENOMEM on result in amdgpu_bo_list_create()
authorTom St Denis <tom.stdenis@amd.com>
Fri, 9 Oct 2015 16:46:40 +0000 (12:46 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 22 Oct 2015 16:36:55 +0000 (12:36 -0400)
commitb176372af4c773de188fae67e334e2a83c5706e3
tree6c20579f62bd32d016c699eb851bc8fe3c9a364b
parent1a6a8f34a0b17ac03f42bac416e5d289f9c3248f
amdgpu: Cleanly handle ENOMEM on result in amdgpu_bo_list_create()

Move the allocation of result prior to the IOCTL so we can cleanly
backtrack if the allocation fails.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
amdgpu/amdgpu_bo.c