Index: trunk/psModules/src/camera/pmFPAMosaic.c
===================================================================
--- trunk/psModules/src/camera/pmFPAMosaic.c	(revision 12701)
+++ trunk/psModules/src/camera/pmFPAMosaic.c	(revision 13064)
@@ -632,5 +632,5 @@
     if (!mdok || xBin->data.S32[index] == 0) {
         psError(PS_ERR_UNKNOWN, true, "CELL.XBIN for cell is not set.\n");
-        good = false;
+	return false;
     } else if (xBin->data.S32[index] < *xBinMin) {
         *xBinMin = xBin->data.S32[index];
@@ -639,5 +639,5 @@
     if (!mdok || yBin->data.S32[index] == 0) {
         psError(PS_ERR_UNKNOWN, true, "CELL.YBIN for cell is not set.\n");
-        good = false;
+	return false;
     } else if (yBin->data.S32[index] < *yBinMin) {
         *yBinMin = yBin->data.S32[index];
@@ -648,10 +648,10 @@
     if (!mdok || (xParityCell != 1 && xParityCell != -1)) {
         psError(PS_ERR_UNKNOWN, true, "CELL.XPARITY for cell is not set.\n");
-        good = false;
+	return false;
     }
     int yParityCell = psMetadataLookupS32(&mdok, cell->concepts, "CELL.YPARITY");
     if (!mdok || (yParityCell != 1 && yParityCell != -1)) {
         psError(PS_ERR_UNKNOWN, true, "CELL.YPARITY for cell is not set.\n");
-        good = false;
+	return false;
     }
 
@@ -663,10 +663,10 @@
         if (!mdok || (xParityChip != 1 && xParityChip != -1)) {
             psError(PS_ERR_UNKNOWN, true, "CHIP.XPARITY for chip is not set.\n");
-            good = false;
+	    return false;
         }
         yParityChip = psMetadataLookupS32(&mdok, chip->concepts, "CHIP.YPARITY");
         if (!mdok || (yParityChip != 1 && yParityChip != -1)) {
             psError(PS_ERR_UNKNOWN, true, "CHIP.YPARITY for chip is not set.\n");
-            good = false;
+	    return false;
         }
     }
@@ -792,5 +792,5 @@
             continue;
         }
-        allGood |= addCell(images, masks, weights, x0, y0, xBin, yBin, xFlip, yFlip,
+        allGood &= addCell(images, masks, weights, x0, y0, xBin, yBin, xFlip, yFlip,
                            cell, xBinChip, yBinChip, false, x0Target, y0Target,
                            xParityTarget, yParityTarget);
