media: pci: cx23885: replace BUG with error return
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Fri, 21 Jul 2023 08:23:42 +0000 (10:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Sep 2023 09:11:06 +0000 (11:11 +0200)
commit96a0bf5827e7035d5121560952cd047b92fb4a40
tree0abb808fd128ffb64b2dbf010cd0f90fd8e35108
parent257092cb544c7843376b3e161f789e666ef06c98
media: pci: cx23885: replace BUG with error return

[ Upstream commit 2e1796fd4904fdd6062a8e4589778ea899ea0c8d ]

It was completely unnecessary to use BUG in buffer_prepare().
Just replace it with an error return. This also fixes a smatch warning:

drivers/media/pci/cx23885/cx23885-video.c:422 buffer_prepare() error: uninitialized symbol 'ret'.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/pci/cx23885/cx23885-video.c