git: 32a2994b4487 - stable/14 - sound: Use DSP_REGISTERED in dsp_clone()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 27 Oct 2024 16:33:10 UTC
The branch stable/14 has been updated by christos:
URL: https://cgit.FreeBSD.org/src/commit/?id=32a2994b4487d9de5190982fd88cbc6d57414cdb
commit 32a2994b4487d9de5190982fd88cbc6d57414cdb
Author: Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2024-10-24 11:37:10 +0000
Commit: Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2024-10-27 16:32:16 +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
(cherry picked from commit bb5e3ac1a7b71480a50fc0c813c916a3d058336c)
---
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);
}