Ad fd check to clear buffer.
diff --git a/driver-bitforce.c b/driver-bitforce.c
index 27494c4..07ca917 100644
--- a/driver-bitforce.c
+++ b/driver-bitforce.c
@@ -143,6 +143,9 @@ static void biforce_clear_buffer(struct cgpu_info *bitforce)
int fdDev = bitforce->device_fd;
char pdevbuf[0x100];
+ if (!fdDev)
+ return;
+
applog(LOG_DEBUG, "BFL%i: Clearing read buffer", bitforce->device_id);
mutex_lock(&bitforce->device_mutex);