]> git.hungrycats.org Git - linux/commitdiff
drm/amdgpu/gmc6: replace BUG() with an error
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 15 Jun 2026 23:14:01 +0000 (19:14 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 8 Jul 2026 18:25:30 +0000 (14:25 -0400)
There's no need to crash the kernel for this case.

Reviewed-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c

index a914dd8183b58b26dab50a50bd4ed6704783a91e..b49098931d1971574ab9c29a555b0aba51024f98 100644 (file)
@@ -124,7 +124,7 @@ static int gmc_v6_0_init_microcode(struct amdgpu_device *adev)
                chip_name = "hainan";
                break;
        default:
-               BUG();
+               return -EINVAL;
        }
 
        /* this memory configuration requires special firmware */