There's no need to crash the kernel for this case.

Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c 
b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
index 479690c44f0d5..ca36d434cfe1e 100644
--- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c
@@ -136,7 +136,7 @@ static int psp_v11_0_init_microcode(struct psp_context *psp)
                err = psp_init_toc_microcode(psp, ucode_prefix);
                break;
        default:
-               BUG();
+               return -EINVAL;
        }
 
        return err;
-- 
2.54.0

Reply via email to