Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 32cf9a16 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: mtpav - Fix initial value for input hwport



Fix the initial value for input hwport.  The old value (-1) may cause
Oops when an realtime MIDI byte is received before the input port is
explicitly given.
Instead, now it's set to the broadcasting as default.

Tested-by: default avatarHolger Dehnhardt <dehnhardt@ahdehnhardt.de>
Cc: <stable@kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 8e492151
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -706,7 +706,6 @@ static int __devinit snd_mtpav_probe(struct platform_device *dev)
	mtp_card->card = card;
	mtp_card->irq = -1;
	mtp_card->share_irq = 0;
	mtp_card->inmidiport = 0xffffffff;
	mtp_card->inmidistate = 0;
	mtp_card->outmidihwport = 0xffffffff;
	init_timer(&mtp_card->timer);
@@ -719,6 +718,8 @@ static int __devinit snd_mtpav_probe(struct platform_device *dev)
	if (err < 0)
		goto __error;

	mtp_card->inmidiport = mtp_card->num_ports + MTPAV_PIDX_BROADCAST;

	err = snd_mtpav_get_ISA(mtp_card);
	if (err < 0)
		goto __error;