There's no need to crash the kernel for this case.
Signed-off-by: Alex Deucher <[email protected]>
---
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
index 3fde9be746900..a57378ebeac33 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
@@ -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++) {
--
2.54.0