media: platform: renesas-ceu: drop buf NULL check
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 24 May 2023 12:11:46 +0000 (13:11 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 9 Jun 2023 15:08:09 +0000 (16:08 +0100)
commit99f9cd2e25cc4cd1a193c8e4c9ea4877abf6bddd
treea2ed7ae3006c2460647b97ecd03336258c9d6fcb
parent7cc471112edd5292a05698dd3f7b9543844a26a1
media: platform: renesas-ceu: drop buf NULL check

Since start_streaming is only called if there are at least two
buffers queued, the ceudev->capture list will never be empty, so
the check whether there are no buffers can be dropped.

Note that the '!buf' check was wrong in any case, if we wanted to
check for an empty list it should have used list_empty().

This fixes this smatch warning:

drivers/media/platform/renesas/renesas-ceu.c:705 ceu_start_streaming() warn: can 'buf' even be NULL?

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/renesas/renesas-ceu.c