From 236c9bfa4a133cbdfeeb3f7a1902950210549634 Mon Sep 17 00:00:00 2001 From: Changbing Xiong Date: Wed, 20 Aug 2014 23:05:07 -0300 Subject: [PATCH] [media] media: correct return value in dvb_demux_poll Data type of return value is unsigned int, but in function of dvb_demux_poll, when the pointer of dmxdevfilter equals NULL, it will return -EINVAL, which is invalid. Signed-off-by: Changbing Xiong Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dmxdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb-core/dmxdev.c b/drivers/media/dvb-core/dmxdev.c index c0363f1b6c90..7a5c07003c41 100644 --- a/drivers/media/dvb-core/dmxdev.c +++ b/drivers/media/dvb-core/dmxdev.c @@ -1088,7 +1088,7 @@ static unsigned int dvb_demux_poll(struct file *file, poll_table *wait) unsigned int mask = 0; if (!dmxdevfilter) - return -EINVAL; + return POLLERR; poll_wait(file, &dmxdevfilter->buffer.queue, wait); -- 2.20.1