summaryrefslogtreecommitdiffstats
path: root/scd/ccid-driver.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2017-05-31 03:05:36 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2017-05-31 03:05:36 +0200
commit8defb21d34410d000c8b776e0e3a1edd04762638 (patch)
treee3d9b6ebc5d3f62759b1b3b8255bd33763b99f15 /scd/ccid-driver.c
parentscd: Handle a failure of libusb_init. (diff)
downloadgnupg2-8defb21d34410d000c8b776e0e3a1edd04762638.tar.xz
gnupg2-8defb21d34410d000c8b776e0e3a1edd04762638.zip
scd: Fix error code on failure at usb_init.
* scd/ccid-driver.c (ccid_dev_scan): Return GPG_ERR_ENODEV. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to '')
-rw-r--r--scd/ccid-driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scd/ccid-driver.c b/scd/ccid-driver.c
index 1d5e8f26d..ce6133f80 100644
--- a/scd/ccid-driver.c
+++ b/scd/ccid-driver.c
@@ -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;
}