summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorEmily Deng <Emily.Deng@amd.com>2018-10-18 09:01:05 +0200
committerAlex Deucher <alexander.deucher@amd.com>2018-10-22 21:40:54 +0200
commit91eec27ebbc4f4e7cf4ee6a589d2f060ba9d0d79 (patch)
treeebd9e8b2fd01945f96a7ccd10dd021515f0c1d10 /drivers/gpu/drm
parentdrm/amd/powerplay: error out when force clock level under auto dpm mode V2 (diff)
downloadlinux-91eec27ebbc4f4e7cf4ee6a589d2f060ba9d0d79.tar.xz
linux-91eec27ebbc4f4e7cf4ee6a589d2f060ba9d0d79.zip
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>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 1e4dd09a5072..d11489e8b388 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -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);
if (r) {
pr_err("firmware loading failed\n");