public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH] staging: most: video: replace BUG_ON() in comp_exit
@ 2026-04-16 16:33 Ajith P V
  0 siblings, 0 replies; only message in thread
From: Ajith P V @ 2026-04-16 16:33 UTC (permalink / raw)
  To: parthiban.veerasooran, christian.gromm, gregkh
  Cc: linux-staging, linux-kernel, ajithpv.linux

Replace BUG_ON() with WARN_ON() and pr_err inside comp_exit().

BUG_ON() is risky and not recommended to use in kernel.
It should replace with proper handlers such as WARN()-family
(see Documentation/process/deprecated.rst).

Signed-off-by: Ajith P V <ajithpv.linux@gmail.com>
---
 drivers/staging/most/video/video.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/most/video/video.c b/drivers/staging/most/video/video.c
index 04351f8ccccf..78cbf367c308 100644
--- a/drivers/staging/most/video/video.c
+++ b/drivers/staging/most/video/video.c
@@ -577,7 +577,8 @@ static void __exit comp_exit(void)
 
 	most_deregister_configfs_subsys(&comp);
 	most_deregister_component(&comp);
-	BUG_ON(!list_empty(&video_devices));
+	if (WARN_ON(!list_empty(&video_devices)))
+		pr_err("video_devices list not empty during module exit\n");
 }
 
 module_init(comp_init);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-16 16:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-16 16:33 [PATCH] staging: most: video: replace BUG_ON() in comp_exit Ajith P V

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox