diff options
author | Dave Airlie <airlied@redhat.com> | 2016-11-10 08:37:52 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-11-10 08:37:52 +1000 |
commit | 24f910365e84342365a46e5c07d3ac02757c94a1 (patch) | |
tree | 7c52e36a8372b57e7ca38c93c7c419c5fcdc7185 /drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | |
parent | cf532232c32ae9be2bf2c299f50e61d67700229f (diff) | |
parent | f20024d8ba6bc8abf8d0ec12eabfdedd9935fff2 (diff) | |
download | talos-op-linux-24f910365e84342365a46e5c07d3ac02757c94a1.tar.gz talos-op-linux-24f910365e84342365a46e5c07d3ac02757c94a1.zip |
Merge branch 'drm-fixes-4.9' of git://people.freedesktop.org/~agd5f/linux into drm-fixes
3 more amdgpu fixes.
* 'drm-fixes-4.9' of git://people.freedesktop.org/~agd5f/linux:
drm/amd/powerplay: return false instead of -EINVAL
drm/amdgpu/powerplay/smu7: fix unintialized data usage
drm/amdgpu: fix crash in acp_hw_fini
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c index 892d60fb225b..2057683f7b59 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c @@ -395,9 +395,12 @@ static int acp_hw_fini(void *handle) { int i, ret; struct device *dev; - struct amdgpu_device *adev = (struct amdgpu_device *)handle; + /* return early if no ACP */ + if (!adev->acp.acp_genpd) + return 0; + for (i = 0; i < ACP_DEVS ; i++) { dev = get_mfd_cell_dev(adev->acp.acp_cell[i].name, i); ret = pm_genpd_remove_device(&adev->acp.acp_genpd->gpd, dev); |