Browse Source

Bugfix: ztex: Don't try to destroy a mutex that was never created (single FPGA Ztex devices)

Luke Dashjr 13 years ago
parent
commit
1cde75742b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      driver-ztex.c

+ 1 - 1
driver-ztex.c

@@ -376,7 +376,7 @@ static void ztex_shutdown(struct thr_info *thr)
 	if (!ztex)
 		return;
 	
-	if (ztex->fpgaNum == 0)
+	if (ztex->root->numberOfFpgas > 1 && ztex->fpgaNum == 0)
 		pthread_mutex_destroy(&ztex->mutex);
 	applog(LOG_DEBUG, "%s: shutdown", ztex->repr);
 	libztex_destroy_device(ztex);