darwin: return correct error code from libusb_get_config_descriptor when the configur...
authorNathan Hjelm <hjelmn@me.com>
Mon, 20 May 2013 14:20:33 +0000 (08:20 -0600)
committerNathan Hjelm <hjelmn@me.com>
Thu, 6 Jun 2013 16:45:37 +0000 (10:45 -0600)
libusb/os/darwin_usb.c

index d4e6b9c..a24558c 100644 (file)
@@ -482,7 +482,7 @@ static int get_configuration_index (struct libusb_device *dev, int config_value)
   }
 
   /* configuration not found */
-  return LIBUSB_ERROR_OTHER;
+  return LIBUSB_ERROR_NOT_FOUND;
 }
 
 static int darwin_get_active_config_descriptor(struct libusb_device *dev, unsigned char *buffer, size_t len, int *host_endian) {