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)
commit64598e23de7873b9d47cd9b9a02daa2bb4ded343
treeaf0cd220498c8145cfb44a1af2898b41aa065ba2
parentb8badd507a5b76a8e58c864b01116f3de43464cb
drm/amdgpu: return -EFAULT if copy_to_user() fails

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

Fixes: c65b0805e77919 ("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