]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: return -EFAULT if copy_to_user() fails
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 3 Jul 2021 09:46:20 +0000 (12:46 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 8 Jul 2021 21:47:28 +0000 (17:47 -0400)
commita76636e00cdcd71aaec3fc7023b2ce607ecceb71
treeaf0cd220498c8145cfb44a1af2898b41aa065ba2
parent8386d6918b14c2ee13905bf8c8dec13d2a8243ad
drm/amdgpu: return -EFAULT if copy_to_user() fails

If copy_to_user() fails then this should return -EFAULT instead of
-EINVAL.

Fixes: 86798bdeecfd74 ("drm/amdgpu: RAS EEPROM table is now in debugfs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Luben Tuikov <luben.tuikov@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c