]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: saa7134: fix incorrect use to determine if list is empty
authorJakob Koschel <jakobkoschel@gmail.com>
Mon, 28 Feb 2022 14:26:26 +0000 (15:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 11:57:52 +0000 (13:57 +0200)
commit0fe6ac436c4335bff384556cd80cdbe75240e253
treecb15440bd6376de5c9ef0263d9aec84e50257315
parent58ab4c59f5cf6070133514063b4832c8f9ca45f8
media: saa7134: fix incorrect use to determine if list is empty

[ Upstream commit 9f1f4b642451d35667a4dc6a9c0a89d954b530a3 ]

'dev' will *always* be set by list_for_each_entry().
It is incorrect to assume that the iterator value will be NULL if the
list is empty.

Instead of checking the pointer it should be checked if
the list is empty.

Fixes: 79dd0c69f05f ("V4L: 925: saa7134 alsa is now a standalone module")
Signed-off-by: Jakob Koschel <jakobkoschel@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/pci/saa7134/saa7134-alsa.c