From: Takashi Iwai Date: Thu, 5 Mar 2009 08:37:40 +0000 (+0100) Subject: ALSA: hdsp - Ignore MIDI and PCM events in interrupts until initialized X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c2503cd3be9eacb1dd06ec5b6fba8bb06aac12a8;p=mv-sheeva.git ALSA: hdsp - Ignore MIDI and PCM events in interrupts until initialized Ignore MIDI and PCM events in the interrupt handler until the device gets initialized properly. Otherwise you may get kernel panic by the access to uninitialized devices via hotplugging. Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index dc65fe1c9c6..314e73531bd 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c @@ -3740,6 +3740,9 @@ static irqreturn_t snd_hdsp_interrupt(int irq, void *dev_id) midi0status = hdsp_read (hdsp, HDSP_midiStatusIn0) & 0xff; midi1status = hdsp_read (hdsp, HDSP_midiStatusIn1) & 0xff; + if (!(hdsp->state & HDSP_InitializationComplete)) + return IRQ_HANDLED; + if (audio) { if (hdsp->capture_substream) snd_pcm_period_elapsed(hdsp->pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream);