Browse Source

Bugfix: bitforce detect: Close device after ZGX failure

Luke Dashjr 12 years ago
parent
commit
ae43dcba7a
1 changed files with 1 additions and 0 deletions
  1. 1 0
      driver-bitforce.c

+ 1 - 0
driver-bitforce.c

@@ -147,6 +147,7 @@ static bool bitforce_detect_one(const char *devpath)
 	bitforce_cmd1(fdDev, 0, pdevbuf, sizeof(pdevbuf), "ZGX");
 	if (unlikely(!pdevbuf[0])) {
 		applog(LOG_DEBUG, "BFL: Error reading/timeout (ZGX)");
+		BFclose(fdDev);
 		return 0;
 	}