Re: [PATCH] staging: most: dim2: remove BUG_ON() calls
From: Greg KH
Date: Wed Mar 18 2026 - 11:35:16 EST
On Mon, Mar 09, 2026 at 06:33:04PM -0700, Mark Adamenko wrote:
> All BUG_ON() calls in this file are redundant either because of
> impossible conditions or prior error handling. Remove all BUG_ON()
> calls.
>
> Signed-off-by: Mark Adamenko <marusik.adamenko@xxxxxxxxx>
> ---
> drivers/staging/most/dim2/dim2.c | 13 -------------
> 1 file changed, 13 deletions(-)
>
> diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c
> index 66617e89e028..c8fdc6a52467 100644
> --- a/drivers/staging/most/dim2/dim2.c
> +++ b/drivers/staging/most/dim2/dim2.c
> @@ -165,9 +165,6 @@ static int try_start_dim_transfer(struct hdm_channel *hdm_ch)
> unsigned long flags;
> struct dim_ch_state st;
>
> - BUG_ON(!hdm_ch);
> - BUG_ON(!hdm_ch->is_initialized);
> -
Please only remove one at a time, and provide the "proof" in the
changelog for why the case can never be hit.
thanks,
greg k-h