git: a46c92aad16b - main - sound: Propagate error value from dsp_make_dev()

Christos Margiolis <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a676bf7.4291e.51ae127__25464.1038061649$1785162759$gmane$org@gitrepo.freebsd.org>
The branch main has been updated by christos:

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

commit a46c92aad16bf6c9d6c3967c8af3e8b3bdb59cda
Author:     Christos Margiolis <[email protected]>
AuthorDate: 2026-07-27 14:31:10 +0000
Commit:     Christos Margiolis <[email protected]>
CommitDate: 2026-07-27 14:31:30 +0000

    sound: Propagate error value from dsp_make_dev()
    
    It is better to propagate it to pcm_register(), and later to the device
    drivers, than to simply ignore it and return ENXIO.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/dev/sound/pcm/dsp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c
index 33b0e4419bd8..8cc0884647a3 100644
--- a/sys/dev/sound/pcm/dsp.c
+++ b/sys/dev/sound/pcm/dsp.c
@@ -148,7 +148,7 @@ dsp_make_dev(device_t dev)
 	if (err != 0) {
 		device_printf(dev, "failed to create dsp%d: error %d",
 		    unit, err);
-		return (ENXIO);
+		return (err);
 	}
 
 	return (0);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.