Re: [PATCH v2] staging: most: video: replace BUG_ON() with pr_warn() in comp_exit()
From: Gabriel Rondon
Date: Wed Apr 08 2026 - 09:45:56 EST
On Wed, Apr 08, 2026 at 01:51:59PM +0200, Greg Kroah-Hartman wrote:
> How can this ever happen? Why not fix that to ensure it can never
> happen, and then this check can just be removed entirely?
Thanks for the review, Greg.
I looked at most_deregister_component() in core.c — it already calls
disconnect_channel() for every linked channel via bus_for_each_dev().
So the manual cleanup loop in comp_exit() and the comment saying
"mostcore currently doesn't call disconnect_channel()" are outdated.
For v3 I plan to remove the manual cleanup loop, the stale comment,
and the BUG_ON entirely — leaving comp_exit() to just call
most_deregister_configfs_subsys() and most_deregister_component(),
which already handles the full teardown.
Does that match what you had in mind?
Gabriel