diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-07-21 11:23:42 +0300 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-07-25 10:24:31 +0300 |
commit | 2e1796fd4904fdd6062a8e4589778ea899ea0c8d (patch) | |
tree | f9ab95ae93374fc76e0d5ff49331dbe9d53f1c73 /drivers/media/pci | |
parent | 466ae77a8cd45fa1a0bef370ca18782a1ed5aac2 (diff) | |
download | linux-2e1796fd4904fdd6062a8e4589778ea899ea0c8d.tar.xz |
media: pci: cx23885: replace BUG with error return
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>
Diffstat (limited to 'drivers/media/pci')
-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, |