From a14dad95d45057133f5e44e6045be93712430760 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Wed, 27 Jul 2011 14:48:28 +0100 Subject: 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. --- tinymix.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit v1.2.3