From 51464a0eadc82c84780fba08a53163cb6e4da2a4 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Mon, 2 May 2016 15:56:02 +0900 Subject: [PATCH] scd: More fix of error return path. * scd/command.c (open_card): Return GPG_ERR_ENODEV on the failure of apdu_connect. -- Backport of master commit: 6677d8b61446eb5760a30a2488c992d6e895a9ed GnuPG-bug-id: 2306 Signed-off-by: NIIBE Yutaka --- scd/command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scd/command.c b/scd/command.c index b26bd6862..44f0b21bd 100644 --- a/scd/command.c +++ b/scd/command.c @@ -482,8 +482,8 @@ open_card (ctrl_t ctrl, const char *apptype) else if (sw == SW_HOST_CARD_INACTIVE) err = gpg_error (GPG_ERR_CARD_RESET); else - err = gpg_error (GPG_ERR_CARD); - } + err = gpg_error (GPG_ERR_ENODEV); + } else err = select_application (ctrl, slot, apptype, &ctrl->app_ctx); }