Browse Source

Bugfix: cointerra: Check lowlevel device is USB before trying to probe it (as USB)

Luke Dashjr 11 years ago
parent
commit
2d19cdb6fb
1 changed files with 6 additions and 0 deletions
  1. 6 0
      driver-cointerra.c

+ 6 - 0
driver-cointerra.c

@@ -280,6 +280,12 @@ bool cointerra_lowl_probe(const struct lowlevel_device_info * const info)
 	struct lowl_usb_endpoint *ep;
 	bool b;
 	
+	if (info->lowl != &lowl_usb)
+	{
+		bfg_probe_result_flags = BPR_WRONG_DEVTYPE;
+		return false;
+	}
+	
 	if (!cointerra_open(info, cointerra_drv.dname, &usbh, &ep, &ctainfo))
 		return false;
 	mutex_init(&ctainfo.lock);