git: 76a53e183957 - stable/15 - sound: Allocate mpu401 with M_WAITOK

From: Christos Margiolis <christos_at_FreeBSD.org>
Date: Fri, 09 Jan 2026 23:28:03 UTC
The branch stable/15 has been updated by christos:

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

commit 76a53e1839573968929400a661537f0e91f8700a
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-01-02 16:57:06 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-01-09 23:27:25 +0000

    sound: Allocate mpu401 with M_WAITOK
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    
    (cherry picked from commit fd1312d3629cda9691c67af6154946cd55467076)
---
 sys/dev/sound/midi/mpu401.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sys/dev/sound/midi/mpu401.c b/sys/dev/sound/midi/mpu401.c
index 500e15c79497..d3fb6b214d3e 100644
--- a/sys/dev/sound/midi/mpu401.c
+++ b/sys/dev/sound/midi/mpu401.c
@@ -142,10 +142,7 @@ mpu401_init(kobj_class_t cls, void *cookie, driver_intr_t softintr,
 	struct mpu401 *m;
 
 	*cb = NULL;
-	m = malloc(sizeof(*m), M_MIDI, M_NOWAIT | M_ZERO);
-
-	if (!m)
-		return NULL;
+	m = malloc(sizeof(*m), M_MIDI, M_WAITOK | M_ZERO);
 
 	kobj_init((kobj_t)m, cls);