drm/amdgpu/sdma3.0: replace BUG() with an error

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>
This commit is contained in:
Alex Deucher 2026-06-15 19:06:42 -04:00
parent 8fe5f5e2da
commit 9599e82b19

View File

@ -298,7 +298,8 @@ static int sdma_v3_0_init_microcode(struct amdgpu_device *adev)
case CHIP_STONEY:
chip_name = "stoney";
break;
default: BUG();
default:
return -EINVAL;
}
for (i = 0; i < adev->sdma.num_instances; i++) {