From 8b94d0517902d179879fdb8a96edc5c0ab2e7c62 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Mon, 5 Aug 2019 11:29:40 +0100 Subject: [PATCH] drm/amd/powerplay: remove redundant duplicated return check The check on ret is duplicated in two places, it is redundant code. Remove it. Addresses-Coverity: ("Logically dead code") Fixes: b94afb61cdae ("drm/amd/powerplay: honor hw limit on fetching metrics data for navi10") Reviewed-by: Evan Quan Signed-off-by: Colin Ian King Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/navi10_ppt.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c index 4947a526cbdf..3f9f68d90016 100644 --- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c +++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c @@ -941,8 +941,6 @@ static int navi10_get_gpu_power(struct smu_context *smu, uint32_t *value) ret = navi10_get_metrics_table(smu, &metrics); if (ret) return ret; - if (ret) - return ret; *value = metrics.AverageSocketPower << 8; @@ -1001,8 +999,6 @@ static int navi10_get_fan_speed_rpm(struct smu_context *smu, ret = navi10_get_metrics_table(smu, &metrics); if (ret) return ret; - if (ret) - return ret; *speed = metrics.CurrFanSpeed; -- 2.30.2