Commit 5eb680a0 authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu: fix error handling in ib_schedule()



If fence emit fails, free the fence if necessary.

Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4321c5ca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -302,7 +302,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned int num_ibs,
		if (job && job->vmid)
			amdgpu_vmid_reset(adev, ring->vm_hub, job->vmid);
		amdgpu_ring_undo(ring);
		return r;
		goto free_fence;
	}
	*f = &af->base;
	/* get a ref for the job */