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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
2ae53dd15e
commit
890d10e6b7
@@ -412,7 +412,7 @@ static int buffer_prepare(struct vb2_buffer *vb)
|
|||||||
dev->height >> 1);
|
dev->height >> 1);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BUG();
|
return -EINVAL; /* should not happen */
|
||||||
}
|
}
|
||||||
dprintk(2, "[%p/%d] buffer_init - %dx%d %dbpp 0x%08x - dma=0x%08lx\n",
|
dprintk(2, "[%p/%d] buffer_init - %dx%d %dbpp 0x%08x - dma=0x%08lx\n",
|
||||||
buf, buf->vb.vb2_buf.index,
|
buf, buf->vb.vb2_buf.index,
|
||||||
|
Reference in New Issue
Block a user