Fixes the following coccicheck:

drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c:1412:12-13: WARNING opportunity 
for min()

Cc: Christian König <[email protected]>
Cc: Alex Deucher <[email protected]>
Signed-off-by: Srinivasan Shanmugam <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
index 4764d2171f92..8795c4ac556f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
@@ -1409,5 +1409,5 @@ int amdgpu_ras_eeprom_init(struct 
amdgpu_ras_eeprom_control *control,
                res = amdgpu_ras_eeprom_reset_table(control);
        }
 
-       return res < 0 ? res : 0;
+       return min_t(int, res, 0);
 }
-- 
2.25.1

Reply via email to