diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2023-05-25 11:04:51 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-06-09 18:10:04 +0300 |
commit | 9c9d501b28a00f4365632260df6cae488a905af7 (patch) | |
tree | c665772e9358278f1a42b89ccbe423dd6304d752 /drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | |
parent | 321488d180c2f5c1811a0ba7b18d18c7af87739b (diff) | |
download | linux-9c9d501b28a00f4365632260df6cae488a905af7.tar.xz |
drm/amd/amdgpu: Fix up locking etc in amdgpu_debugfs_gprwave_ioctl()
There are two bugs here.
1) Drop the lock if copy_from_user() fails.
2) If the copy fails then the correct error code is -EFAULT instead of
-EINVAL.
I also broke up the long line and changed "sizeof rd->id" to
"sizeof(rd->id)".
Fixes: 553f973a0d7b ("drm/amd/amdgpu: Update debugfs for XCC support (v3)")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c')
0 files changed, 0 insertions, 0 deletions