Skip to content

Commit

Permalink
[ALSA] Fix bug in snd-usb-usx2y's usX2Y_pcms_lock_check()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
Signed-off-by: Jaroslav Kysela <[email protected]>
  • Loading branch information
Karsten Wiese authored and Jaroslav Kysela committed Oct 6, 2006
1 parent 104326f commit 9b08c2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/usb/usx2y/usx2yhwdeppcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 9b08c2a

Please sign in to comment.