[linux-dvb] [PATCH] propagating more errors

Johannes Stezenbach js at linuxtv.org
Sun Jun 19 15:06:34 CEST 2005


Wolfgang Rohdewald wrote:
> Changes:
> - propagate more errors back to caller or log them, mainly in
>   av7110.c and av7110_av.c
> - fix error message in StartHWFilter
> - debug output for dvb_{video,audio}_ioctl shows the command (hex)
> - fix av7110_fe_lock_fix as suggested by Oliver Endriss
> 
> Signed-off-by: Wolfgang Rohdewald <wolfgang at rohdewald.de>

I committed this patch to CVS now (with the old "changes", sorry).
Addditionally I committed a few cleanups (ret<0 => ret < 0, indentation)
and the following change:

Index: drivers/media/dvb/ttpci/av7110.c
===================================================================
RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/ttpci/av7110.c,v
retrieving revision 1.180
diff -u -p -r1.180 av7110.c
--- drivers/media/dvb/ttpci/av7110.c	19 Jun 2005 12:49:47 -0000	1.180
+++ drivers/media/dvb/ttpci/av7110.c	19 Jun 2005 12:54:53 -0000
@@ -1050,8 +1050,7 @@ static int av7110_stop_feed(struct dvb_d
 {
 	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_d
 	}
 
 	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 */
 				}
+			}
 		}
 	}
 

I think the error handling in dvb_demux.c where it calls stop_feed()
is dubious, too :-(

Thanks,
Johannes




More information about the linux-dvb mailing list