On Sun Apr 12 17:24:16 2026 +0000, Hungyu Lin wrote:
> 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 <[email protected]>
> Reviewed-by: Dan Carpenter <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

 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;
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to