]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/powerplay: add powerplay valid check to avoid null point. (v2)
authorRex Zhu <Rex.Zhu@amd.com>
Tue, 29 Dec 2015 05:56:03 +0000 (13:56 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 8 Jan 2016 20:39:23 +0000 (15:39 -0500)
commit6fadfd3d12144b85733d12fde61446cf7596389d
treee3efd3937e624d2e96cf5e5557fb9bbd376e0867
parent1e78ca2f5c3006932bef41b6d3f1750d3fa85fc0
drm/amd/powerplay: add powerplay valid check to avoid null point. (v2)

In case CONFIG_DRM_AMD_POWERPLAY is defined and amdgpu.powerplay=0.
some functions in powrplay can also be called by DAL. and the input parameter is *adev.
if just check point not NULL was not enough and will lead to NULL point error.

V2: AGD: rebase on upstream

Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/amd_powerplay.c
drivers/gpu/drm/amd/powerplay/inc/pp_instance.h