scd: Fix error code on failure at usb_init.
authorNIIBE Yutaka <gniibe@fsij.org>
Wed, 31 May 2017 01:05:36 +0000 (10:05 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Wed, 31 May 2017 01:05:36 +0000 (10:05 +0900)
* scd/ccid-driver.c (ccid_dev_scan): Return GPG_ERR_ENODEV.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
scd/ccid-driver.c

index 1d5e8f2..ce6133f 100644 (file)
@@ -1306,7 +1306,7 @@ ccid_dev_scan (int *idx_max_p, struct ccid_dev_table **t_p)
       if ((rc = libusb_init (NULL)))
         {
           DEBUGOUT_1 ("usb_init failed: %s.\n", libusb_error_name (rc));
-          return gpg_error (GPG_ERR_NOT_FOUND);
+          return gpg_error (GPG_ERR_ENODEV);
         }
       initialized_usb = 1;
     }