Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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=98276

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org

+4 -1
+4 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
··· 395 395 { 396 396 int i, ret; 397 397 struct device *dev; 398 - 399 398 struct amdgpu_device *adev = (struct amdgpu_device *)handle; 399 + 400 + /* return early if no ACP */ 401 + if (!adev->acp.acp_genpd) 402 + return 0; 400 403 401 404 for (i = 0; i < ACP_DEVS ; i++) { 402 405 dev = get_mfd_cell_dev(adev->acp.acp_cell[i].name, i);