summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alsaucm/usecase.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/alsaucm/usecase.c b/alsaucm/usecase.c
index 48ee816..7677422 100644
--- a/alsaucm/usecase.c
+++ b/alsaucm/usecase.c
@@ -229,10 +229,11 @@ static int do_one(struct context *context, struct cmd *cmd, char **argv)
if (!context->no_open) {
do_initial_open(context);
context->no_open = 1;
+ } else {
+ fprintf(stderr, "%s: command '%s' requires an open card\n",
+ context->command, cmd->id);
+ return 0;
}
- fprintf(stderr, "%s: command '%s' requires an open card\n",
- context->command, cmd->id);
- return 0;
}
switch (cmd->code) {
case OM_OPEN: