Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2024 11:37:31 GMT
From:      Christos Margiolis <christos@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: bb5e3ac1a7b7 - main - sound: Use DSP_REGISTERED in dsp_clone()
Message-ID:  <202410241137.49OBbVtB071622@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by christos:

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

commit bb5e3ac1a7b71480a50fc0c813c916a3d058336c
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2024-10-24 11:37:10 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2024-10-24 11:37:10 +0000

    sound: Use DSP_REGISTERED in dsp_clone()
    
    DSP_REGISTERED calls PCM_REGISTERED, and already contains all the checks
    we are doing.
    
    No functional change intended.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      2 days
    Reviewed by:    dev_submerge.ch, markj
    Differential Revision:  https://reviews.freebsd.org/D47196
---
 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 6573dfaabf2f..92bfb4d58b86 100644
--- a/sys/dev/sound/pcm/dsp.c
+++ b/sys/dev/sound/pcm/dsp.c
@@ -1967,7 +1967,7 @@ found:
 	 * have returned already, meaning it will have set snd_unit to -1, and
 	 * thus devclass_get_softc() will return NULL here.
 	 */
-	if (d != NULL && PCM_REGISTERED(d) && d->dsp_dev != NULL) {
+	if (DSP_REGISTERED(d)) {
 		*dev = d->dsp_dev;
 		dev_ref(*dev);
 	}


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202410241137.49OBbVtB071622>