From f1ab8ea9e7eba981c9d087fed46ff86f9eb938ec Mon Sep 17 00:00:00 2001 From: Kano Date: Mon, 4 Mar 2013 21:18:42 +1100 Subject: [PATCH] Release MMQ device only once (not 4 times) --- usbutils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usbutils.c b/usbutils.c index 6b2997e2..a4527a85 100644 --- a/usbutils.c +++ b/usbutils.c @@ -859,6 +859,10 @@ static void release_cgpu(struct cgpu_info *cgpu) struct cgpu_info *lookcgpu; int i; + // It has already been done + if (cgpu->usbinfo.nodev) + return; + cgpu->usbinfo.nodev = true; cgpu->usbinfo.nodev_count++; gettimeofday(&(cgpu->usbinfo.last_nodev), NULL);