]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
[PATCH] ALSA: Fix bug in snd-usb-usx2y's usX2Y_pcms_lock_check()
authorKarsten Wiese <annabellesgarden@yahoo.de>
Mon, 16 Oct 2006 12:45:14 +0000 (14:45 +0200)
committerChris Wright <chrisw@sous-sol.org>
Sat, 4 Nov 2006 01:33:45 +0000 (17:33 -0800)
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

From: Karsten Wiese <annabellesgarden@yahoo.de>
Signed-off-by: Karsten Wiese <annabellesgarden@yahoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
sound/usb/usx2y/usx2yhwdeppcm.c

index 88b72b52590f44c4566864577223720b2d5a7c98..605ac5bb9255ab66e27e6a9541868398d0785b81 100644 (file)
@@ -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;
                }
        }