From cf4ce59b3b70238352c7f1729f0f7223214828ad Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Fri, 20 Sep 2024 01:46:19 +0000
Subject: [PATCH] rtl88x2CE_WiFi_linux add concurrent mode

---
 kernel/sound/synth/emux/emux_nrpn.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/kernel/sound/synth/emux/emux_nrpn.c b/kernel/sound/synth/emux/emux_nrpn.c
index 7eed579..a7d8318 100644
--- a/kernel/sound/synth/emux/emux_nrpn.c
+++ b/kernel/sound/synth/emux/emux_nrpn.c
@@ -349,6 +349,9 @@
 snd_emux_xg_control(struct snd_emux_port *port, struct snd_midi_channel *chan,
 		    int param)
 {
+	if (param >= ARRAY_SIZE(chan->control))
+		return -EINVAL;
+
 	return send_converted_effect(xg_effects, ARRAY_SIZE(xg_effects),
 				     port, chan, param,
 				     chan->control[param],

--
Gitblit v1.6.2