diff options
| author | Alex Deucher <alexander.deucher@amd.com> | 2025-08-22 19:12:37 +0300 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2025-08-27 20:57:51 +0300 |
| commit | 7e2a5b0a9a165a7c51274aa01b18be29491b4345 (patch) | |
| tree | 72dfee033cfaab245af75f6bfb622c5245335ffc /drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | |
| parent | 5f976c9939f0d5916d2b8ef3156a6d1799781df1 (diff) | |
| download | linux-7e2a5b0a9a165a7c51274aa01b18be29491b4345.tar.xz | |
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c index 86cabb20bff1..f72de06a4ac8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c @@ -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; } |
