]> git.hungrycats.org Git - linux/commitdiff
drm/amdgpu/cik_sdma: replace BUG() with an error
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 15 Jun 2026 23:03:27 +0000 (19:03 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 8 Jul 2026 18:25:20 +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/cik_sdma.c

index b703ef1fe3406eced026534cdc982113ad938b96..b951328d94cfb789b5ab334089954db6726213aa 100644 (file)
@@ -125,7 +125,8 @@ static int cik_sdma_init_microcode(struct amdgpu_device *adev)
        case CHIP_MULLINS:
                chip_name = "mullins";
                break;
-       default: BUG();
+       default:
+               return -EINVAL;
        }
 
        for (i = 0; i < adev->sdma.num_instances; i++) {