]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: refine amdgpu_fru_get_product_info
authorJiansong Chen <Jiansong.Chen@amd.com>
Tue, 25 May 2021 06:14:58 +0000 (14:14 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 2 Jun 2021 21:51:12 +0000 (17:51 -0400)
commite87f4aa27b4c7eb4d61e59e1ba1c958e835c7d54
tree39fb8d6b4fb42950bd79d37d653cf74c12b9ae9a
parent4b8a429c47e623f85581d2be0027f9e8e1c76285
drm/amdgpu: refine amdgpu_fru_get_product_info

1. eliminate potential array index out of bounds.
2. return meaningful value for failure.

Signed-off-by: Jiansong Chen <Jiansong.Chen@amd.com>
Reviewed-by: Jack Gui <Jack.Gui@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c