Skip to content
Commit a1d6b190 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Alex Deucher
Browse files

drm/amdgpu: check memory allocation failure



Check memory allocation failure and return -ENOMEM in such a case.

'num_post_dep_syncobjs' still has to be set to 0 before the test in order
to have it initialized if 'amdgpu_cs_parser_fini()' is called to free
resources.

The calling graph would be, in such a case!
   failure in amdgpu_cs_process_syncobj_out_dep()
      ---> error code returned by amdgpu_cs_dependencies()
         --> amdgpu_cs_parser_fini() is called

Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2959a534
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment