aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-07-27 14:48:28 +0100
committerSimon Wilson <simonwilson@google.com>2011-07-27 12:39:32 -0700
commita14dad95d45057133f5e44e6045be93712430760 (patch)
tree7438cacbc8057c9e17437058e54dc8433ceb71ae
parent49900f07e463419c74c3c511746dfff717378cd5 (diff)
tinymix: Say if we can't open the mixer
Otherwise we just list a device with zero controls which isn't the most obvious failure mode.
-rw-r--r--tinymix.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tinymix.c b/tinymix.c
index 7f593b3..3fc2e41 100644
--- a/tinymix.c
+++ b/tinymix.c
@@ -41,6 +41,10 @@ int main(int argc, char **argv)
struct mixer *mixer;
mixer = mixer_open(0);
+ if (!mixer) {
+ fprintf(stderr, "Failed to open mixer\n");
+ return EXIT_FAILURE;
+ }
if (argc == 1)
tinymix_list_controls(mixer);