Only add_cgpu in hashfast driver once we have a real driver set up.
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;
}