From c58d495688f4201a41d2cb8575fb34d46875c7ca Mon Sep 17 00:00:00 2001 From: Olliver Schinagl Date: Mon, 6 Jun 2022 15:04:26 +0200 Subject: [PATCH] dvb-core/dmxdev: Ensure ctx is a valid variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When enabling CONFIG_DVB_MMAP the dvb_vb2_ctx is copied to a non-existant variable ctx, which causes an obvious compilation error. dvb-core/dmxdev.c: In function ‘dvb_dmxdev_ts_callback’: dvb-core/dmxdev.c:495:17: error: ‘ctx’ undeclared (first use in this function) 495 | ctx = &dmxdevfilter->vb2_ctx; | ^~~ dvb-core/dmxdev.c:495:17: note: each undeclared identifier is reported only once for each function it appears in This was fixed upstream in commit 57868acc369a (media: videobuf2: Add new uAPI for DVB streaming I/O, Mon Dec 18 22:35:53 2017 -0500) about 5 years ago. Signed-off-by: Olliver Schinagl --- dvb-core/dmxdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dvb-core/dmxdev.c b/dvb-core/dmxdev.c index 4740b0e..2b4371f 100644 --- a/dvb-core/dmxdev.c +++ b/dvb-core/dmxdev.c @@ -480,6 +480,9 @@ static int dvb_dmxdev_ts_callback(const u8 *buffer1, size_t buffer1_len, { struct dmxdev_filter *dmxdevfilter = feed->priv; struct dvb_ringbuffer *buffer; +#ifdef CONFIG_DVB_MMAP + struct dvb_vb2_ctx *ctx = NULL; +#endif int ret; spin_lock(&dmxdevfilter->dev->lock);