Signed-off-by: monk.liu <monk.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
int r;
num_resources = request->number_of_resources;
+
+ if (!num_resources) {
+ *handle = 0;
+ return 0;
+ }
+
if (fence_ib)
++num_resources;
union drm_amdgpu_bo_list args;
int r;
+ if (!handle)
+ return 0;
+
memset(&args, 0, sizeof(args));
args.in.operation = AMDGPU_BO_LIST_OP_DESTROY;
args.in.list_handle = handle;