Commit c767d74a authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/amdgpu/userq: fix error handling of invalid doorbell



If the doorbell is invalid, be sure to set the r to an error
state so the function returns an error.

Reviewed-by: default avatarDavid (Ming Qiang) Wu <David.Wu3@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 7e2a5b0a)
Cc: stable@vger.kernel.org
parent ee38ea0a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -471,6 +471,7 @@ amdgpu_userq_create(struct drm_file *filp, union drm_amdgpu_userq *args)
	if (index == (uint64_t)-EINVAL) {
		drm_file_err(uq_mgr->file, "Failed to get doorbell for queue\n");
		kfree(queue);
		r = -EINVAL;
		goto unlock;
	}