upstream: [media] em28xx_dvb: only call the software filter if data
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Sun, 2 Mar 2014 11:20:54 +0000 (08:20 -0300)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:54:47 +0000 (11:54 +0900)
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.chehab@samsung.com>
drivers/media/usb/em28xx/em28xx-dvb.c

index f3d27c4..075890f 100644 (file)
@@ -158,6 +158,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 {
@@ -167,6 +169,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,