[PATCH] staging: most: video: replace BUG_ON with WARN_ON_ONCE
From: Iman Reihanian
Date: Thu Mar 05 2026 - 20:18:19 EST
BUG_ON causes a kernel panic if the condition is true, which is
too severe for this cleanup check on module exit. Replace it with
WARN_ON_ONCE to emit a warning and allow the system to continue.
Signed-off-by: Iman Reihanian <ireihani@xxxxxxx>
---
drivers/staging/most/video/video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/most/video/video.c b/drivers/staging/most/video/video.c
index 04351f8ccccf..279ec98aa70e 100644
--- a/drivers/staging/most/video/video.c
+++ b/drivers/staging/most/video/video.c
@@ -577,7 +577,7 @@ static void __exit comp_exit(void)
most_deregister_configfs_subsys(&comp);
most_deregister_component(&comp);
- BUG_ON(!list_empty(&video_devices));
+ WARN_ON_ONCE(!list_empty(&video_devices));
}
module_init(comp_init);
--
2.39.5