]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amd/powerplay: fixed wrong return value on error (v2)
authorEvan Quan <evan.quan@amd.com>
Tue, 26 Sep 2017 03:35:30 +0000 (11:35 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 6 Oct 2017 20:50:36 +0000 (16:50 -0400)
v2: squash in typo fix (Tom)

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c

index d2f695692f772cbb30a45ffadaa6d4dfffc8b6ae..598a194737a99e0e4190ece6cea4a541d4557c8c 100644 (file)
@@ -1243,8 +1243,8 @@ int vega10_enable_didt_config(struct pp_hwmgr *hwmgr)
                }
 
                if (0 == result) {
-                       PP_ASSERT_WITH_CODE((!vega10_enable_smc_features(hwmgr, true, data->smu_features[GNLD_DIDT].smu_feature_bitmap)),
-                               "[EnableDiDtConfig] Attempt to Enable DiDt feature Failed!", return result);
+                       result = vega10_enable_smc_features(hwmgr, true, data->smu_features[GNLD_DIDT].smu_feature_bitmap);
+                       PP_ASSERT_WITH_CODE((0 == result), "[EnableDiDtConfig] Attempt to Enable DiDt feature Failed!", return result);
                        data->smu_features[GNLD_DIDT].enabled = true;
                }
        }
@@ -1290,8 +1290,8 @@ int vega10_disable_didt_config(struct pp_hwmgr *hwmgr)
                }
 
                if (0 == result) {
-                       PP_ASSERT_WITH_CODE((0 != vega10_enable_smc_features(hwmgr, false, data->smu_features[GNLD_DIDT].smu_feature_bitmap)),
-                                       "[DisableDiDtConfig] Attempt to Disable DiDt feature Failed!", return result);
+                       result = vega10_enable_smc_features(hwmgr, false, data->smu_features[GNLD_DIDT].smu_feature_bitmap);
+                       PP_ASSERT_WITH_CODE((0 == result), "[DisableDiDtConfig] Attempt to Disable DiDt feature Failed!", return result);
                        data->smu_features[GNLD_DIDT].enabled = false;
                }
        }