diff options
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-ioread.c')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-ioread.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ioread.c b/drivers/media/video/pvrusb2/pvrusb2-ioread.c index f7a2e225a002..b71f9a961f8a 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-ioread.c +++ b/drivers/media/video/pvrusb2/pvrusb2-ioread.c | |||
@@ -213,7 +213,9 @@ int pvr2_ioread_setup(struct pvr2_ioread *cp,struct pvr2_stream *sp) | |||
213 | " pvr2_ioread_setup (tear-down) id=%p",cp); | 213 | " pvr2_ioread_setup (tear-down) id=%p",cp); |
214 | pvr2_ioread_stop(cp); | 214 | pvr2_ioread_stop(cp); |
215 | pvr2_stream_kill(cp->stream); | 215 | pvr2_stream_kill(cp->stream); |
216 | pvr2_stream_set_buffer_count(cp->stream,0); | 216 | if (pvr2_stream_get_buffer_count(cp->stream)) { |
217 | pvr2_stream_set_buffer_count(cp->stream,0); | ||
218 | } | ||
217 | cp->stream = NULL; | 219 | cp->stream = NULL; |
218 | } | 220 | } |
219 | if (sp) { | 221 | if (sp) { |
@@ -251,7 +253,6 @@ int pvr2_ioread_set_enabled(struct pvr2_ioread *cp,int fl) | |||
251 | return ret; | 253 | return ret; |
252 | } | 254 | } |
253 | 255 | ||
254 | |||
255 | static int pvr2_ioread_get_buffer(struct pvr2_ioread *cp) | 256 | static int pvr2_ioread_get_buffer(struct pvr2_ioread *cp) |
256 | { | 257 | { |
257 | int stat; | 258 | int stat; |