summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2016-10-13 15:32:04 +0800
committerAlex Deucher <alexander.deucher@amd.com>2016-10-13 19:14:17 -0400
commit24e8df6a6837d6cff182e84b838dc1d6971251fc (patch)
tree915ace48dcd70b6188c5773a2a40b63857099305 /drivers/gpu
parenteeb2fa0c97ba661f8b7fb210a1de10928b67a47b (diff)
downloadlinux-stable-24e8df6a6837d6cff182e84b838dc1d6971251fc.tar.gz
linux-stable-24e8df6a6837d6cff182e84b838dc1d6971251fc.tar.bz2
linux-stable-24e8df6a6837d6cff182e84b838dc1d6971251fc.zip
drm/amd/powerplay: fix static checker warnings in smu7_hwmgr.c
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index 7c67a5a91182..e7fb8e95436b 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -1452,8 +1452,10 @@ static int smu7_get_evv_voltages(struct pp_hwmgr *hwmgr)
struct phm_ppt_v1_clock_voltage_dependency_table *sclk_table = NULL;
- if (table_info != NULL)
- sclk_table = table_info->vdd_dep_on_sclk;
+ if (table_info == NULL)
+ return -EINVAL;
+
+ sclk_table = table_info->vdd_dep_on_sclk;
for (i = 0; i < SMU7_MAX_LEAKAGE_COUNT; i++) {
vv_id = ATOM_VIRTUAL_VOLTAGE_ID0 + i;