diff mbox series

[BUG] selftests: alsa: conf.c: wrong parm passed to printf [FIXED]

Message ID 36c37fba-fb1f-4e7e-bc92-c75b426ea72c@alu.unizg.hr (mailing list archive)
State New, archived
Headers show
Series [BUG] selftests: alsa: conf.c: wrong parm passed to printf [FIXED] | expand

Commit Message

Mirsad Todorovac Jan. 6, 2024, 9:22 p.m. UTC
Hi, all,

There is a minor omission in selftests/alsa/conf.c, returning errno where there is
strerror(errno) passed in the sibling calls to printf().

The bug was apparently introduced with the commit aba51cd0949ae
("selftests: alsa - add PCM test").

As a diff speaks like a thousand words, the fix is simple:

Regards,
Mirsad

----- cut -----
diff mbox series

Patch

diff --git a/tools/testing/selftests/alsa/conf.c b/tools/testing/selftests/alsa/conf.c
index 00925eb8d9f4..89e3656a042d 100644
--- a/tools/testing/selftests/alsa/conf.c
+++ b/tools/testing/selftests/alsa/conf.c
@@ -179,7 +179,7 @@  static char *sysfs_get(const char *sysfs_root, const char *id)
        close(fd);
        if (len < 0)
                ksft_exit_fail_msg("sysfs: unable to read value '%s': %s\n",
-                                  path, errno);
+                                  path, strerror(errno));
        while (len > 0 && path[len-1] == '\n')
                len--;
        path[len] = '\0';