diff options
author | Hans Verkuil | 2023-07-21 10:23:42 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2023-09-23 11:11:06 +0200 |
commit | 96a0bf5827e7035d5121560952cd047b92fb4a40 (patch) | |
tree | 0abb808fd128ffb64b2dbf010cd0f90fd8e35108 /drivers/media | |
parent | 257092cb544c7843376b3e161f789e666ef06c98 (diff) |
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>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/pci/cx23885/cx23885-video.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c index 671fc0588e43..9af2c5596121 100644 --- a/drivers/media/pci/cx23885/cx23885-video.c +++ b/drivers/media/pci/cx23885/cx23885-video.c @@ -413,7 +413,7 @@ static int buffer_prepare(struct vb2_buffer *vb) dev->height >> 1); break; default: - BUG(); + return -EINVAL; /* should not happen */ } dprintk(2, "[%p/%d] buffer_init - %dx%d %dbpp 0x%08x - dma=0x%08lx\n", buf, buf->vb.vb2_buf.index, |