Skip to content

Commit 5910fb3

Browse files
qaqlandperexg
authored andcommitted
alsactl: fix error handling in check_control_cdev()
Closes: #310 Signed-off-by: qaqland <anguoli@uniontech.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
1 parent e78583a commit 5910fb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

alsactl/monitor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ static int check_control_cdev(int infd, bool *retry)
176176
ssize_t len = read(infd, buf, sizeof(*ev) + NAME_MAX);
177177
if (len < 0) {
178178
if (errno != EAGAIN)
179-
err = errno;
179+
err = -errno;
180180
break;
181181
} else if (len == 0) {
182182
break;

0 commit comments

Comments
 (0)