mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
media: tegra-video: tegra210: remove redundant NULL check in dequeue_buf_done
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> Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
f86ed54838
commit
c8e13b0dcb
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user