Commit bc733d495267a23ef8660220d696c6e549ce30b3

Authored by Takashi Iwai
1 parent 6162552b0d

ALSA: mpu401: Fix missing initialization of irq field

The irq field of struct snd_mpu401 is supposed to be initialized to -1.
Since it's set to zero as of now, a probing error before the irq
installation results in a kernel warning "Trying to free already-free
IRQ 0".

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=44821
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

sound/drivers/mpu401/mpu401_uart.c
... ... @@ -554,6 +554,7 @@
554 554 spin_lock_init(&mpu->output_lock);
555 555 spin_lock_init(&mpu->timer_lock);
556 556 mpu->hardware = hardware;
  557 + mpu->irq = -1;
557 558 if (! (info_flags & MPU401_INFO_INTEGRATED)) {
558 559 int res_size = hardware == MPU401_HW_PC98II ? 4 : 2;
559 560 mpu->res = request_region(port, res_size, "MPU401 UART");