From: Hungyu Lin <dennylin0707@gmail.com>
To: thierry.reding@gmail.com, jonathanh@nvidia.com,
skomatineni@nvidia.com, luca.ceresoli@bootlin.com
Cc: mchehab@kernel.org, gregkh@linuxfoundation.org,
linux-media@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Hungyu Lin <dennylin0707@gmail.com>
Subject: [PATCH] media: tegra-video: tegra210: remove redundant NULL check in dequeue_buf_done
Date: Sun, 12 Apr 2026 17:24:16 +0000 [thread overview]
Message-ID: <20260412172416.33052-1-dennylin0707@gmail.com> (raw)
list_first_entry() does not returns NULL when the list is known to be
non-empty. The NULL check before list_del_init() is therefore
redundant.
Remove the unnecessary check.
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
drivers/staging/media/tegra-video/tegra210.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/media/tegra-video/tegra210.c b/drivers/staging/media/tegra-video/tegra210.c
index da99f19a39e7..a6606768fa03 100644
--- a/drivers/staging/media/tegra-video/tegra210.c
+++ b/drivers/staging/media/tegra-video/tegra210.c
@@ -362,8 +362,7 @@ dequeue_buf_done(struct tegra_vi_channel *chan)
buf = list_first_entry(&chan->done,
struct tegra_channel_buffer, queue);
- if (buf)
- list_del_init(&buf->queue);
+ list_del_init(&buf->queue);
spin_unlock(&chan->done_lock);
return buf;
--
2.34.1
next reply other threads:[~2026-04-12 17:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-12 17:24 Hungyu Lin [this message]
2026-04-13 8:05 ` [PATCH] media: tegra-video: tegra210: remove redundant NULL check in dequeue_buf_done Dan Carpenter
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=20260412172416.33052-1-dennylin0707@gmail.com \
--to=dennylin0707@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linux-tegra@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=mchehab@kernel.org \
--cc=skomatineni@nvidia.com \
--cc=thierry.reding@gmail.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