From: Gabriel Rondon Date: Wed, 1 Apr 2026 10:10:38 +0000 (+0100) Subject: staging: most: dim2: remove unnecessary NULL check in try_start_dim_transfer() X-Git-Tag: v7.2-rc1~66^2~198 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=fde67f5b1fc77f3c6701b31751643c11526927bc;p=thirdparty%2Flinux.git staging: most: dim2: remove unnecessary NULL check in try_start_dim_transfer() Remove the !hdm_ch check. Although hdm_ch is a function parameter, it is already dereferenced on the preceding line to initialize head (head = &hdm_ch->pending_list), so a NULL check after that point is dead code. Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/acwjEHyEYg0V3OyC@stanley.mountain Signed-off-by: Gabriel Rondon Link: https://patch.msgid.link/20260401101038.24304-1-grondon@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c index f5bd7d44f1656..3277904366533 100644 --- a/drivers/staging/most/dim2/dim2.c +++ b/drivers/staging/most/dim2/dim2.c @@ -165,7 +165,7 @@ static int try_start_dim_transfer(struct hdm_channel *hdm_ch) unsigned long flags; struct dim_ch_state st; - if (!hdm_ch || !hdm_ch->is_initialized) + if (!hdm_ch->is_initialized) return -EINVAL; spin_lock_irqsave(&dim_lock, flags);