From: Alex Deucher Date: Mon, 15 Jun 2026 23:14:01 +0000 (-0400) Subject: drm/amdgpu/gmc6: replace BUG() with an error X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22b19c575e8e750ccee5d88b39c0ac2efc8c5870;p=linux drm/amdgpu/gmc6: replace BUG() with an error There's no need to crash the kernel for this case. Reviewed-by: Kent Russell Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c index a914dd8183b58..b49098931d197 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c @@ -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 */