Skip to content

Commit c767d74

Browse files
committed
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: David (Ming Qiang) Wu <David.Wu3@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 7e2a5b0) Cc: stable@vger.kernel.org
1 parent ee38ea0 commit c767d74

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ amdgpu_userq_create(struct drm_file *filp, union drm_amdgpu_userq *args)
471471
if (index == (uint64_t)-EINVAL) {
472472
drm_file_err(uq_mgr->file, "Failed to get doorbell for queue\n");
473473
kfree(queue);
474+
r = -EINVAL;
474475
goto unlock;
475476
}
476477

0 commit comments

Comments
 (0)