Disable a device that fails to prepare.
diff --git a/cgminer.c b/cgminer.c
index df6f30f..1f3e0f8 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -8351,8 +8351,10 @@ static void hotplug_process(void)
thr->cgpu = cgpu;
thr->device_thread = j;
- if (cgpu->drv->thread_prepare && !cgpu->drv->thread_prepare(thr))
+ if (cgpu->drv->thread_prepare && !cgpu->drv->thread_prepare(thr)) {
+ cgpu->deven = DEV_DISABLED;
continue;
+ }
if (unlikely(thr_info_create(thr, NULL, miner_thread, thr)))
quit(1, "hotplug thread %d create failed", thr->id);