Commit 29998c2ca304205316cd4c749cb9f2ea71b4197d

Con Kolivas 2014-04-14T20:15:41

Fix off by one error in bxf chip count when adjusting device size

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/driver-bitfury.c b/driver-bitfury.c
index cbdb405..5c5fd61 100644
--- a/driver-bitfury.c
+++ b/driver-bitfury.c
@@ -801,8 +801,9 @@ static void bitfury_detect(bool __maybe_unused hotplug)
 	usb_detect(&bitfury_drv, bitfury_detect_one);
 }
 
-static void adjust_bxf_chips(struct cgpu_info *bitfury, struct bitfury_info *info, int chips)
+static void adjust_bxf_chips(struct cgpu_info *bitfury, struct bitfury_info *info, int chip)
 {
+	int chips = chip + 1;
 	size_t old, new;
 
 	if (likely(chips <= info->chips))