aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/usb/ccid-card-emulated.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index 094284d..deb6d47 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/ccid-card-emulated.c
@@ -503,9 +503,15 @@ static int emulated_initfn(CCIDCardState *base)
if (init_pipe_signaling(card) < 0) {
return -1;
}
- card->backend = parse_enumeration(card->backend_str, backend_enum_table, 0);
+
+ card->backend = 0;
+ if (card->backend_str) {
+ card->backend = parse_enumeration(card->backend_str,
+ backend_enum_table, 0);
+ }
+
if (card->backend == 0) {
- printf("unknown backend, must be one of:\n");
+ printf("backend must be one of:\n");
for (ptable = backend_enum_table; ptable->name != NULL; ++ptable) {
printf("%s\n", ptable->name);
}