Browse Source

BFL stop 1st init command if no device

Kano 13 years ago
parent
commit
3515b6e2e6
1 changed files with 3 additions and 0 deletions
  1. 3 0
      driver-bitforce.c

+ 3 - 0
driver-bitforce.c

@@ -85,6 +85,9 @@ static void bitforce_initialise(struct cgpu_info *bitforce, bool lock)
 	if (lock)
 		mutex_lock(&bitforce->device_mutex);
 
+	if (bitforce->usbinfo.nodev)
+		goto failed;
+
 	// Reset
 	err = usb_transfer(bitforce, FTDI_TYPE_OUT, FTDI_REQUEST_RESET,
 				FTDI_VALUE_RESET, bitforce->usbdev->found->interface, C_RESET);