Index: comedi/drivers/amplc_pc236.c
===================================================================
RCS file: /var/cvs/comedi/comedi/drivers/amplc_pc236.c,v
retrieving revision 1.8
diff -u -r1.8 amplc_pc236.c
--- comedi/drivers/amplc_pc236.c	5 Aug 2003 03:32:30 -0000	1.8
+++ comedi/drivers/amplc_pc236.c	19 Jan 2005 17:29:03 -0000
@@ -222,12 +222,13 @@
 			if (((pci_dev->class ^ pci_id->class) & pci_id->class_mask) != 0)
 				continue;
 			/* Found a match. */
-			break;
-		}
-		if (!pci_dev) {
-			printk("no %s found!\n", thisboard->fancy_name);
-			return -EIO;
+			goto found;
 		}
+
+		printk("no %s found!\n", thisboard->fancy_name);
+		return -EIO;
+
+found:
 		if ((ret=pci_enable_device(pci_dev)) < 0) {
 			printk("error enabling PCI device!\n");
 			return ret;
Index: comedi/drivers/amplc_pc263.c
===================================================================
RCS file: /var/cvs/comedi/comedi/drivers/amplc_pc263.c,v
retrieving revision 1.4
diff -u -r1.4 amplc_pc263.c
--- comedi/drivers/amplc_pc263.c	15 Feb 2003 18:35:46 -0000	1.4
+++ comedi/drivers/amplc_pc263.c	19 Jan 2005 17:29:03 -0000
@@ -193,12 +193,12 @@
 			if (((pci_dev->class ^ pci_id->class) & pci_id->class_mask) != 0)
 				continue;
 			/* Found a match. */
-			break;
-		}
-		if (!pci_dev) {
-			printk("no %s found!\n", thisboard->fancy_name);
-			return -EIO;
+			goto found;
 		}
+		printk("no %s found!\n", thisboard->fancy_name);
+		return -EIO;
+
+found:
 		if ((ret=pci_enable_device(pci_dev)) < 0) {
 			printk("error enabling PCI device!\n");
 			return ret;
Index: comedi/drivers/amplc_pci230.c
===================================================================
RCS file: /var/cvs/comedi/comedi/drivers/amplc_pci230.c,v
retrieving revision 1.27
diff -u -r1.27 amplc_pci230.c
--- comedi/drivers/amplc_pci230.c	17 Oct 2004 15:40:57 -0000	1.27
+++ comedi/drivers/amplc_pci230.c	19 Jan 2005 17:29:05 -0000
@@ -328,21 +328,26 @@
 	int pci_iobase, iobase = 0;		/* PCI230's I/O spaces 1 and 2 respectively. */
 	struct pci_dev *pci_dev;
 	int i=0,irq_hdl;
+	int found;
 
 	printk("comedi%d: amplc_pci230\n",dev->minor);
 	
 	/* Find card */
+	found=0;
 	pci_for_each_dev(pci_dev){
 		if(pci_dev->vendor != PCI_VENDOR_ID_AMPLICON)
 			continue;
 		for(i=0;i<n_pci230_boards;i++){
 			if(pci_dev->device == pci230_boards[i].id)break;
 		}
-		if(i<n_pci230_boards)break;
+		if(i<n_pci230_boards){
+			found=1;
+			break;
+		}
  		printk("comedi%d: found an unknown Amplicon board, dev id=0x%04x\n",
 			dev->minor,pci_dev->device);
 	}
-	if(!pci_dev){
+	if(!found){
 		printk("comedi%d: amplc_pci230: No PCI230 found\n",dev->minor);
 		return -EIO;
 	}
Index: comedi/drivers/cb_pcidda.c
===================================================================
RCS file: /var/cvs/comedi/comedi/drivers/cb_pcidda.c,v
retrieving revision 1.28
diff -u -r1.28 cb_pcidda.c
--- comedi/drivers/cb_pcidda.c	23 Oct 2003 00:44:07 -0000	1.28
+++ comedi/drivers/cb_pcidda.c	19 Jan 2005 17:29:06 -0000
@@ -289,19 +289,18 @@
 			if(it->options[0] || it->options[1]){
 				if(pcidev->bus->number==it->options[0] &&
 				   PCI_SLOT(pcidev->devfn)==it->options[1]){
-					break;
+					goto found_pci;
 				}
 			}else{
-				break;
+				goto found_pci;
 			}
 		}
 	}
 
-	if(!pcidev){
-		printk("Not a ComputerBoards/MeasurementComputing card on requested position\n");
-		return -EIO;
-	}
+	printk("Not a ComputerBoards/MeasurementComputing card on requested position\n");
+	return -EIO;
 
+found_pci:
 	for(index=0;index<N_BOARDS;index++){
 		if(cb_pcidda_boards[index].device_id == pcidev->device){
 			goto found;
Index: comedi/drivers/das08.c
===================================================================
RCS file: /var/cvs/comedi/comedi/drivers/das08.c,v
retrieving revision 1.49
diff -u -r1.49 das08.c
--- comedi/drivers/das08.c	21 Feb 2004 15:46:53 -0000	1.49
+++ comedi/drivers/das08.c	19 Jan 2005 17:29:07 -0000
@@ -929,6 +929,7 @@
 	int ret;
 	unsigned long iobase, pci_iobase = 0;
 	struct pci_dev *pdev;
+	int found;
 
 	if((ret=alloc_private(dev,sizeof(struct das08_private_struct)))<0)
 		return ret;
@@ -943,20 +944,23 @@
 		}
 		printk("\n");
 		// find card
+		found = 0;
 		pci_for_each_dev(pdev){
 			if(pdev->vendor == PCI_VENDOR_ID_COMPUTERBOARDS &&
 				pdev->device == PCI_DEVICE_ID_PCIDAS08){
 				if(it->options[0] || it->options[1]){
 					if(pdev->bus->number == it->options[0] &&
 					   PCI_SLOT(pdev->devfn) == it->options[1]){
+						found = 1;
 						break;
 					}
 				}else{
+					found = 1;
 					break;
 				}
 			}
 		}
-		if(!pdev){
+		if(!found){
 			printk("No pci das08 cards found\n");
 			return -EIO;
 		}
Index: comedi/drivers/rtd520.c
===================================================================
RCS file: /var/cvs/comedi/comedi/drivers/rtd520.c,v
retrieving revision 1.38
diff -u -r1.38 rtd520.c
--- comedi/drivers/rtd520.c	31 Jan 2004 22:27:36 -0000	1.38
+++ comedi/drivers/rtd520.c	19 Jan 2005 17:29:09 -0000
@@ -781,24 +781,23 @@
 		    && PCI_SLOT(pcidev->devfn) == it->options[1]) {
 		    DPRINTK("rtd520: found bus=%d slot=%d\n",
 			   it->options[0], it->options[1]);
-		    break;		/* found it */
+		    goto found;	/* found it */
 		}
 	    } else {		/* specific board/slot not specified */
-		break;		/* found one */
+		goto found;	/* found one */
 	    }
 	}
     }
 
-    if (!pcidev) {
-	if (it->options[0] && it->options[1]) {
-	    printk ("No RTD card at bus=%d slot=%d.\n",
-		    it->options[0], it->options[1]);
-	} else {
-	    printk ("No RTD card found.\n");
-	}
-	return -EIO;
+    if (it->options[0] && it->options[1]) {
+	printk ("No RTD card at bus=%d slot=%d.\n",
+		it->options[0], it->options[1]);
+    } else {
+	printk ("No RTD card found.\n");
     }
+    return -EIO;
 
+found:
     if (pcidev->device != thisboard->device_id) {
 	printk ("Found an RTD card, but not the supported type (%x).\n",
 		pcidev->device);

