drm/amd/powerplay: Fix potential NULL pointer issue
authorXiangliang Yu <Xiangliang.Yu@amd.com>
Wed, 30 Nov 2016 06:07:16 +0000 (14:07 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 6 Dec 2016 23:08:38 +0000 (18:08 -0500)
commite9efaaa047b1aebda27b5b65f17c752eb079e51b
tree764bfdd14e3eb5c12d63edda3e4688a218f77868
parent84f3f05b44327b7517086ae048f4131ec175e7b5
drm/amd/powerplay: Fix potential NULL pointer issue

If doesn't enable dpm, the powerplay will not allocate memory for
hw management. So, hw_init_power_state_table function will reference
NULL pointer when resetting.

Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/powerplay/amd_powerplay.c