]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/amd: Set num IP blocks to 0 if discovery fails
authorMario Limonciello <mario.limonciello@amd.com>
Tue, 10 Mar 2026 16:58:22 +0000 (11:58 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 11 Mar 2026 17:58:08 +0000 (13:58 -0400)
commitfae5984296b981c8cc3acca35b701c1f332a6cd8
treef16c4e681d85c85f459d22dbbfb29bd4d0063781
parentda16822ce5c32b5aca848eaea521936d4410d48c
drm/amd: Set num IP blocks to 0 if discovery fails

If discovery has failed for any reason (such as no support for a block)
then there is no need to unwind all the IP blocks in fini. In this
condition there can actually be failures during the unwind too.

Reset num_ip_blocks to zero during failure path and skip the unnecessary
cleanup path.

Suggested-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c