From 5910fb39b5470a6f352e0ed39b69571d1afecc5b Mon Sep 17 00:00:00 2001 From: qaqland Date: Thu, 27 Nov 2025 11:13:27 +0800 Subject: [PATCH] alsactl: fix error handling in check_control_cdev() Closes: https://github.com/alsa-project/alsa-utils/pull/310 Signed-off-by: qaqland Signed-off-by: Jaroslav Kysela --- alsactl/monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alsactl/monitor.c b/alsactl/monitor.c index 36e9398..e830ba5 100644 --- a/alsactl/monitor.c +++ b/alsactl/monitor.c @@ -176,7 +176,7 @@ static int check_control_cdev(int infd, bool *retry) ssize_t len = read(infd, buf, sizeof(*ev) + NAME_MAX); if (len < 0) { if (errno != EAGAIN) - err = errno; + err = -errno; break; } else if (len == 0) { break; -- 2.47.3