Add warning for attempting to unplug a usb device that is already removed.
diff --git a/cgminer.c b/cgminer.c
index b5c340b..dfc3b5e 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -5252,6 +5252,10 @@ retry:
goto retry;
}
cgpu = mining_thr[selected]->cgpu;
+ if (cgpu->usbinfo.nodev) {
+ wlogprint("Device already removed, unable to unplug!\n");
+ goto retry;
+ }
usb_nodev(cgpu);
goto retry;
} else