diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2022-04-26 11:48:03 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-04-26 18:52:20 +0300 |
commit | a52ad5b6ce0df125d0d9ea169b61ae6cc098f047 (patch) | |
tree | 20b3218dfc5a938d1515dc457833eb89ce31080c /drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | |
parent | a6f2e0d9fe6399ff060ae3de28089a4e0462b6cf (diff) | |
download | linux-a52ad5b6ce0df125d0d9ea169b61ae6cc098f047.tar.xz |
drm/amdgpu: debugfs: fix error codes in write functions
There are two error code bugs here. The copy_to/from_user() functions
return the number of bytes remaining (a positive number). We should
return -EFAULT if the copy fails.
Second if we fail because "context.resp_status" is non-zero then return
-EINVAL instead of zero.
Fixes: e50d9ba0d2cd ("drm/amdgpu: Add debugfs TA load/unload/invoke support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c')
0 files changed, 0 insertions, 0 deletions