Commit 261b1299ac5f6bebefb03fe147d137e918426665

Con Kolivas 2013-06-13T13:01:27

Add the cgpu_info structure before avalon reset.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/driver-avalon.c b/driver-avalon.c
index df17d00..9deb190 100644
--- a/driver-avalon.c
+++ b/driver-avalon.c
@@ -622,11 +622,11 @@ static bool avalon_detect_one(libusb_device *dev, struct usb_find_devices *found
 	info->temp_sum = 0;
 	info->temp_old = 0;
 
-	ret = avalon_reset(avalon, true);
-	if (ret && !configured)
+	if (!add_cgpu(avalon))
 		goto unshin;
 
-	if (!add_cgpu(avalon))
+	ret = avalon_reset(avalon, true);
+	if (ret && !configured)
 		goto unshin;
 
 	update_usb_stats(avalon);