diff options
Diffstat (limited to 'drivers/media/dvb/pluto2/pluto2.c')
-rw-r--r-- | drivers/media/dvb/pluto2/pluto2.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/media/dvb/pluto2/pluto2.c b/drivers/media/dvb/pluto2/pluto2.c index 85b437bbddcd..bbebd1c4caca 100644 --- a/drivers/media/dvb/pluto2/pluto2.c +++ b/drivers/media/dvb/pluto2/pluto2.c | |||
@@ -286,15 +286,10 @@ static void pluto_dma_end(struct pluto *pluto, unsigned int nbpackets) | |||
286 | * although one packet has been transfered. | 286 | * although one packet has been transfered. |
287 | */ | 287 | */ |
288 | if ((nbpackets == 0) || (nbpackets > TS_DMA_PACKETS)) { | 288 | if ((nbpackets == 0) || (nbpackets > TS_DMA_PACKETS)) { |
289 | unsigned int i = 0, valid; | 289 | unsigned int i = 0; |
290 | while (pluto->dma_buf[i] == 0x47) | 290 | while (pluto->dma_buf[i] == 0x47) |
291 | i += 188; | 291 | i += 188; |
292 | valid = i / 188; | 292 | nbpackets = i / 188; |
293 | if (nbpackets != valid) { | ||
294 | dev_err(&pluto->pdev->dev, "nbpackets=%u valid=%u\n", | ||
295 | nbpackets, valid); | ||
296 | nbpackets = valid; | ||
297 | } | ||
298 | } | 293 | } |
299 | 294 | ||
300 | dvb_dmx_swfilter_packets(&pluto->demux, pluto->dma_buf, nbpackets); | 295 | dvb_dmx_swfilter_packets(&pluto->demux, pluto->dma_buf, nbpackets); |