drm/amd/powerplay: fix missed hwmgr check warning before call gfx_off_control handler
authorHuang Rui <ray.huang@amd.com>
Fri, 18 May 2018 02:39:16 +0000 (10:39 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Jun 2018 18:45:21 +0000 (13:45 -0500)
commit7584498c1c67bba4d1f5a0f7bf48c9a50c3ff5c8
treeaa6f1045cf418242a71a709d07ec4ee1dbfec490
parent06b18f61ee78f8c69417c3a5e4f21ed678662315
drm/amd/powerplay: fix missed hwmgr check warning before call gfx_off_control handler

Patch 9667849bbb8d: "drm/amd/powerplay: add control gfxoff enabling in late
init" from Mar 13, 2018, leads to the following static checker warning:

drivers/gpu/drm/amd/amdgpu/../powerplay/amd_powerplay.c:194
pp_late_init()
error: we previously assumed 'hwmgr' could be null (see line 185)

drivers/gpu/drm/amd/amdgpu/../powerplay/amd_powerplay.c

This patch fixes the warning to add hwmgr checking.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/amd_powerplay.c