Commit 757124d9 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu: fix crash in acp_hw_fini

On CZ/ST systems with AZ rather than ACP audio, we need to bail
early in hw_fini since there is nothing to do.

bug: https://bugs.freedesktop.org/show_bug.cgi?id=98276Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
parent 020a0bbc
...@@ -395,9 +395,12 @@ static int acp_hw_fini(void *handle) ...@@ -395,9 +395,12 @@ static int acp_hw_fini(void *handle)
{ {
int i, ret; int i, ret;
struct device *dev; struct device *dev;
struct amdgpu_device *adev = (struct amdgpu_device *)handle; 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++) { for (i = 0; i < ACP_DEVS ; i++) {
dev = get_mfd_cell_dev(adev->acp.acp_cell[i].name, i); dev = get_mfd_cell_dev(adev->acp.acp_cell[i].name, i);
ret = pm_genpd_remove_device(&adev->acp.acp_genpd->gpd, dev); ret = pm_genpd_remove_device(&adev->acp.acp_genpd->gpd, dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment