From: grondon@gmail.com
To: gregkh@linuxfoundation.org
Cc: error27@gmail.com, christian.gromm@microchip.com,
parthiban.veerasooran@microchip.com,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Gabriel Rondon <grondon@gmail.com>
Subject: [PATCH] staging: most: dim2: remove unnecessary NULL check in try_start_dim_transfer()
Date: Wed, 1 Apr 2026 11:10:38 +0100 [thread overview]
Message-ID: <20260401101038.24304-1-grondon@gmail.com> (raw)
From: Gabriel Rondon <grondon@gmail.com>
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 <error27@gmail.com>
Closes: https://lore.kernel.org/all/acwjEHyEYg0V3OyC@stanley.mountain
Signed-off-by: Gabriel Rondon <grondon@gmail.com>
---
drivers/staging/most/dim2/dim2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c
index f5bd7d44f..327790436 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);
--
2.33.0
reply other threads:[~2026-04-01 10:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260401101038.24304-1-grondon@gmail.com \
--to=grondon@gmail.com \
--cc=christian.gromm@microchip.com \
--cc=error27@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=parthiban.veerasooran@microchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox