summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorGabriel Rondon <grondon@gmail.com>2026-03-30 19:22:52 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-03-31 10:46:38 +0200
commit2466b3dd4045cd9f5e3f74803a00284bdaf2e493 (patch)
treef39cccfa092864851bf0cf9b26202d9af0904880 /drivers/staging
parentf3dc6732fd52b59bab522c5095290bca0d5f5555 (diff)
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/most/dim2/dim2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c
index 48315f8cd6bb..b820c3647ce5 100644
--- a/drivers/staging/most/dim2/dim2.c
+++ b/drivers/staging/most/dim2/dim2.c
@@ -271,8 +271,8 @@ static void service_done_flag(struct dim2_hdm *dev, int ch_idx)
unsigned long flags;
u8 *data;
- BUG_ON(!hdm_ch);
- BUG_ON(!hdm_ch->is_initialized);
+ if (!hdm_ch || !hdm_ch->is_initialized)
+ return;
spin_lock_irqsave(&dim_lock, flags);