summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-core
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-28 09:03:21 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-28 11:17:28 -0500
commit19393a03577b4572f51364d9e12c0c695979243d (patch)
tree5ffa50f6521e8f6efb10b7b6adaa32e721c1d923 /drivers/media/dvb-core
parent2c06aa7c31cfad2b95e298e55075b962b7e4dc2b (diff)
media: dvb_vb2: Use the sanitized value after processed by VB2 core
if the number of buffers requested by the user is too big, the VB core will truncate to a valid value. Use it, instead of what the user requested. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/dvb-core')
-rw-r--r--drivers/media/dvb-core/dvb_vb2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/dvb-core/dvb_vb2.c b/drivers/media/dvb-core/dvb_vb2.c
index 4223d33c60dc..f1e12a87a92e 100644
--- a/drivers/media/dvb-core/dvb_vb2.c
+++ b/drivers/media/dvb-core/dvb_vb2.c
@@ -35,7 +35,7 @@ static int _queue_setup(struct vb2_queue *vq,
{
struct dvb_vb2_ctx *ctx = vb2_get_drv_priv(vq);
- *nbuffers = ctx->buf_cnt;
+ ctx->buf_cnt = *nbuffers;
*nplanes = 1;
sizes[0] = ctx->buf_siz;