From 19393a03577b4572f51364d9e12c0c695979243d Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 28 Dec 2017 09:03:21 -0500 Subject: [PATCH] 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 --- drivers/media/dvb-core/dvb_vb2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb-core/dvb_vb2.c b/drivers/media/dvb-core/dvb_vb2.c index 4223d33..f1e12a8 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; -- 2.7.4