git: 164651f16c86 - main - sound: Do not return an error from chn_notify() if the children list is empty

From: Christos Margiolis <christos_at_FreeBSD.org>
Date: Tue, 25 Feb 2025 11:48:09 UTC
The branch main has been updated by christos:

URL: https://cgit.FreeBSD.org/src/commit/?id=164651f16c860049a4ad2098206def8ca7a39b4a

commit 164651f16c860049a4ad2098206def8ca7a39b4a
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2025-02-25 11:42:59 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2025-02-25 11:42:59 +0000

    sound: Do not return an error from chn_notify() if the children list is empty
    
    An empty children list does not mean that there is an error.
    
    Reported by:    Florian Walpen <dev@submerge.ch>
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Reviewed by:    dev_submerge.ch
    Differential Revision:  https://reviews.freebsd.org/D48156
---
 sys/dev/sound/pcm/channel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c
index 4b0ca128391b..4d275d00762a 100644
--- a/sys/dev/sound/pcm/channel.c
+++ b/sys/dev/sound/pcm/channel.c
@@ -2360,7 +2360,7 @@ chn_notify(struct pcm_channel *c, u_int32_t flags)
 	CHN_LOCKASSERT(c);
 
 	if (CHN_EMPTY(c, children))
-		return (ENODEV);
+		return (0);
 
 	err = 0;