smartcard: Remove redundant test in smartcard_char_device_on_message_from_device()

The function returns NULL if vheader->type is VSC_Init so no need to
check it a second time.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Christophe Fergeau 2019-02-08 17:26:25 +01:00 committed by Frediano Ziglio
parent 2b7632b376
commit 44836fb55d

View File

@ -207,7 +207,7 @@ RedMsgItem *smartcard_char_device_on_message_from_device(RedCharDeviceSmartcard
break;
}
/* We pass any VSC_Error right now - might need to ignore some? */
if (dev->priv->reader_id == VSCARD_UNDEFINED_READER_ID && vheader->type != VSC_Init) {
if (dev->priv->reader_id == VSCARD_UNDEFINED_READER_ID) {
red_channel_warning(red_channel_client_get_channel(RED_CHANNEL_CLIENT(dev->priv->scc)),
"error: reader_id not assigned for message of type %d",
vheader->type);