summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorJohannes Stezenbach2005-07-08 02:58:00 +0200
committerLinus Torvalds2005-07-08 03:23:58 +0200
commit12ba05049f9060e21ed1f95e876d8d063d2575b2 (patch)
tree9dbcdb1c0b535eb4d0bcbc4448dfd7a5e3b88f08 /drivers/media
parent[PATCH] dvb: ttpci: more error handling for firmware communication (diff)
downloadkernel-qcow2-linux-12ba05049f9060e21ed1f95e876d8d063d2575b2.tar.gz
kernel-qcow2-linux-12ba05049f9060e21ed1f95e876d8d063d2575b2.tar.xz
kernel-qcow2-linux-12ba05049f9060e21ed1f95e876d8d063d2575b2.zip
[PATCH] dvb: ttpci: error handling fix
Change error handling in av7110_stop_feed() to stop as many filters as possible in case of errors. Signed-off-by: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/ttpci/av7110.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index e21deee9a985..87767af7207c 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -1050,8 +1050,7 @@ static int av7110_stop_feed(struct dvb_demux_feed *feed)
{
struct dvb_demux *demux = feed->demux;
struct av7110 *av7110 = demux->priv;
-
- int ret = 0;
+ int i, rc, ret = 0;
dprintk(4, "%p\n", av7110);
if (feed->type == DMX_TYPE_TS) {
@@ -1072,17 +1071,17 @@ static int av7110_stop_feed(struct dvb_demux_feed *feed)
}
if (!ret && feed->type == DMX_TYPE_SEC) {
- int i;
-
- for (i = 0; i<demux->filternum; i++)
+ for (i = 0; i<demux->filternum; i++) {
if (demux->filter[i].state == DMX_STATE_GO &&
demux->filter[i].filter.parent == &feed->feed.sec) {
demux->filter[i].state = DMX_STATE_READY;
if (demux->dmx.frontend->source != DMX_MEMORY_FE) {
- ret = StopHWFilter(&demux->filter[i]);
- if (ret)
- break;
+ rc = StopHWFilter(&demux->filter[i]);
+ if (!ret)
+ ret = rc;
+ /* keep going, stop as many filters as possible */
}
+ }
}
}