Skip to content

Commit 2466b3d

Browse files
gabrielrondongregkh
authored andcommitted
staging: most: dim2: replace BUG_ON() in service_done_flag()
Replace BUG_ON() calls with an early return since the function returns void. BUG_ON() is deprecated as it crashes the entire kernel on assertion failure (see Documentation/process/deprecated.rst). Signed-off-by: Gabriel Rondon <grondon@gmail.com> Link: https://patch.msgid.link/20260330182255.75241-3-grondon@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f3dc673 commit 2466b3d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • drivers/staging/most/dim2

drivers/staging/most/dim2/dim2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,8 +271,8 @@ static void service_done_flag(struct dim2_hdm *dev, int ch_idx)
271271
unsigned long flags;
272272
u8 *data;
273273

274-
BUG_ON(!hdm_ch);
275-
BUG_ON(!hdm_ch->is_initialized);
274+
if (!hdm_ch || !hdm_ch->is_initialized)
275+
return;
276276

277277
spin_lock_irqsave(&dim_lock, flags);
278278

0 commit comments

Comments
 (0)