]> git.hungrycats.org Git - linux/commitdiff
drm/amdgpu/cgs: WARN() rather than BUG()
authorAlex Deucher <alexander.deucher@amd.com>
Mon, 15 Jun 2026 22:58:33 +0000 (18:58 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 8 Jul 2026 18:25:15 +0000 (14:25 -0400)
There's no need to crash the kernel for these cases.

Reviewed-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c

index babd23e5a27ee48cde812a31934d096d109c52b5..9bbe60968352cfed4f55286daf6317df95779539 100644 (file)
@@ -76,10 +76,9 @@ static uint32_t amdgpu_cgs_read_ind_register(struct cgs_device *cgs_device,
                DRM_ERROR("audio endpt register access not implemented.\n");
                return 0;
        default:
-               BUG();
+               WARN(1, "Invalid indirect register space");
+               return 0;
        }
-       WARN(1, "Invalid indirect register space");
-       return 0;
 }
 
 static void amdgpu_cgs_write_ind_register(struct cgs_device *cgs_device,
@@ -104,9 +103,8 @@ static void amdgpu_cgs_write_ind_register(struct cgs_device *cgs_device,
                DRM_ERROR("audio endpt register access not implemented.\n");
                return;
        default:
-               BUG();
+               WARN(1, "Invalid indirect register space");
        }
-       WARN(1, "Invalid indirect register space");
 }
 
 static uint32_t fw_type_convert(struct cgs_device *cgs_device, uint32_t fw_type)