Skip to content
Commit 9c9d501b authored by Dan Carpenter's avatar Dan Carpenter Committed by Alex Deucher
Browse files

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: 553f973a

 ("drm/amd/amdgpu: Update debugfs for XCC support (v3)")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 321488d1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment