Several URBs will be simply not filled. Don't call the DVB
core software filter for those empty URBs.

Signed-off-by: Mauro Carvalho Chehab <m.che...@samsung.com>
---
 drivers/media/usb/em28xx/em28xx-dvb.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c 
b/drivers/media/usb/em28xx/em28xx-dvb.c
index c1091c454354..301463f463c6 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -161,6 +161,8 @@ static inline int em28xx_dvb_urb_data_copy(struct em28xx 
*dev, struct urb *urb)
                                if (urb->status != -EPROTO)
                                        continue;
                        }
+                       if (!urb->actual_length)
+                               continue;
                        dvb_dmx_swfilter(&dev->dvb->demux, urb->transfer_buffer,
                                        urb->actual_length);
                } else {
@@ -170,6 +172,8 @@ static inline int em28xx_dvb_urb_data_copy(struct em28xx 
*dev, struct urb *urb)
                                if (urb->iso_frame_desc[i].status != -EPROTO)
                                        continue;
                        }
+                       if (!urb->iso_frame_desc[i].actual_length)
+                               continue;
                        dvb_dmx_swfilter(&dev->dvb->demux,
                                         urb->transfer_buffer +
                                         urb->iso_frame_desc[i].offset,
-- 
1.8.5.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to