ROCm SMI Pythoc CLI: Fix division by zero fan bug

Signed-off-by: Elena Sakhnovitch <Elena.Sakhnovitch@amd.com>
Change-Id: If259ac1ad6d77ce85b2b7616d972b6e7964a9f78


[ROCm/amdsmi commit: 61cdfff562]
Tá an tiomantas seo le fáil i:
Elena tiomanta 2021-01-20 18:21:23 -05:00
1 tuismitheoir 4a35269cc1
tiomantas bb879e7f38
1 comhad athraithe
+3
+3
Féach ar an gComhad
@@ -186,6 +186,9 @@ def getFanSpeed(device):
if rsmi_ret_ok(ret, device):
fm = fanMax.value
if fm == 0:
return (fl, fm) # to prevent division by zero crash
return (fl, round((float(fl) / float(fm)) * 100, 2))