aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-streams.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-07-18 09:07:10 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 06:29:27 -0400
commitfac3639d886ae577d74e2da16e6a448620d432c9 (patch)
tree2771f7bd1e2f7225b451dc5a272f30b5515e90e4 /drivers/media/video/cx18/cx18-streams.c
parentf19ad390146e7745cbc529f3bef8469cf21f3a6b (diff)
V4L/DVB (8414): videodev/cx18: fix get_index bug and error-handling lock-ups
Fix a bug in get_index that was introduced earlier. Also fix two error handling lock-ups in videodev and cx18 that where found thanks to that bug. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx18/cx18-streams.c')
-rw-r--r--drivers/media/video/cx18/cx18-streams.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/cx18/cx18-streams.c b/drivers/media/video/cx18/cx18-streams.c
index f3d20509a8b..1728b1d832a 100644
--- a/drivers/media/video/cx18/cx18-streams.c
+++ b/drivers/media/video/cx18/cx18-streams.c
@@ -311,8 +311,10 @@ void cx18_streams_cleanup(struct cx18 *cx, int unregister)
311 311
312 /* Teardown all streams */ 312 /* Teardown all streams */
313 for (type = 0; type < CX18_MAX_STREAMS; type++) { 313 for (type = 0; type < CX18_MAX_STREAMS; type++) {
314 if (cx->streams[type].dvb.enabled) 314 if (cx->streams[type].dvb.enabled) {
315 cx18_dvb_unregister(&cx->streams[type]); 315 cx18_dvb_unregister(&cx->streams[type]);
316 cx->streams[type].dvb.enabled = false;
317 }
316 318
317 vdev = cx->streams[type].v4l2dev; 319 vdev = cx->streams[type].v4l2dev;
318 320