Commit a4a1b9425645b632157a1642d195fd16e7825228

Con Kolivas 2013-11-11T17:55:24

Only add_cgpu in hashfast driver once we have a real driver set up.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/driver-hashfast.c b/driver-hashfast.c
index ae23fe1..1e2744d 100644
--- a/driver-hashfast.c
+++ b/driver-hashfast.c
@@ -429,13 +429,14 @@ static bool hfa_detect_one_usb(libusb_device *dev, struct usb_find_devices *foun
 		return false;
 	}
 
-	add_cgpu(hashfast);
-
 	if (!hfa_detect_common(hashfast)) {
 		usb_uninit(hashfast);
 		hashfast = usb_free_cgpu(hashfast);
 		return false;
 	}
+	if (!add_cgpu(hashfast))
+		return false;
+
 	return true;
 }