Commit fc3711c711b17c8367b22bf4e97dbeda4bfbfece

Xiangfu Liu 2014-04-18T12:28:18

driver-avalon2: this functions used on detect, which don't have thr setup yet

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/driver-avalon2.c b/driver-avalon2.c
index 0312e73..85fa6a1 100644
--- a/driver-avalon2.c
+++ b/driver-avalon2.c
@@ -193,8 +193,7 @@ static int decode_pkg(struct thr_info *thr, struct avalon2_ret *ar, uint8_t *pkg
 	if (thr) {
 		avalon2 = thr->cgpu;
 		info = avalon2->device_data;
-	} else // FIXME: Should this happen at all!?
-		return 0;
+	}
 
 	memcpy((uint8_t *)ar, pkg, AVA2_READ_SIZE);