From 6677d8b61446eb5760a30a2488c992d6e895a9ed 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. -- 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 4e80d76b4..72ff1326a 100644 --- a/scd/command.c +++ b/scd/command.c @@ -469,8 +469,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); }