]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: unlock on error in amdgpu_ras_debugfs_table_read()
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 3 Jul 2021 09:45:39 +0000 (12:45 +0300)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 8 Jul 2021 21:47:16 +0000 (17:47 -0400)
commit8386d6918b14c2ee13905bf8c8dec13d2a8243ad
tree09fcd20b0c976851c0d77d2c61f1e950bfdabfef
parente87fd8004191023e900c5e4184ea45024bb8c58f
drm/amdgpu: unlock on error in amdgpu_ras_debugfs_table_read()

This error path needs to unlock before returning.  While we're at it,
the correct error code from copy_to_user() failure is -EFAULT, not
-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