drm/amdgpu: Fix null pointer amdgpu_device_fw_loading

Need to check adev->powerplay.pp_funcs.

Signed-off-by: Emily Deng <Emily.Deng@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Emily Deng 2018-10-18 15:01:05 +08:00 committed by Alex Deucher
parent 241dbbb1fb
commit 91eec27ebb

View File

@ -1600,7 +1600,7 @@ static int amdgpu_device_fw_loading(struct amdgpu_device *adev)
} }
} }
if (adev->powerplay.pp_funcs->load_firmware) { if (adev->powerplay.pp_funcs && adev->powerplay.pp_funcs->load_firmware) {
r = adev->powerplay.pp_funcs->load_firmware(adev->powerplay.pp_handle); r = adev->powerplay.pp_funcs->load_firmware(adev->powerplay.pp_handle);
if (r) { if (r) {
pr_err("firmware loading failed\n"); pr_err("firmware loading failed\n");