From: qaqland Date: Thu, 27 Nov 2025 03:13:27 +0000 (+0800) Subject: alsactl: fix error handling in check_control_cdev() X-Git-Tag: v1.2.15~3 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=5910fb39b5470a6f352e0ed39b69571d1afecc5b;p=alsa-utils.git 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 --- 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;