From: Karsten Wiese Date: Wed, 4 Oct 2006 15:16:46 +0000 (+0200) Subject: [ALSA] Fix bug in snd-usb-usx2y's usX2Y_pcms_lock_check() X-Git-Tag: v2.6.19-rc2~286^2~5 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=9b08c2aa54948361da0e2d26b47e3bcb8f8911e8;p=linux-2.6-omap-h63xx.git [ALSA] Fix bug in snd-usb-usx2y's usX2Y_pcms_lock_check() Fix bug in snd-usb-usx2y's usX2Y_pcms_lock_check() substream can be NULL...... in mainline, bug was introduced by: 2006-06-22 [ALSA] Add O_APPEND flag support to PCM Signed-off-by: Karsten Wiese Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- diff --git a/sound/usb/usx2y/usx2yhwdeppcm.c b/sound/usb/usx2y/usx2yhwdeppcm.c index 9acef9d9054..20708d2ffb6 100644 --- a/sound/usb/usx2y/usx2yhwdeppcm.c +++ b/sound/usb/usx2y/usx2yhwdeppcm.c @@ -632,7 +632,7 @@ static int usX2Y_pcms_lock_check(struct snd_card *card) for (s = 0; s < 2; ++s) { struct snd_pcm_substream *substream; substream = pcm->streams[s].substream; - if (SUBSTREAM_BUSY(substream)) + if (substream && SUBSTREAM_BUSY(substream)) err = -EBUSY; } }