From a1eaf815ad7d1093eb79439576785781e53093bd Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Sun, 20 Nov 2005 13:59:56 +0100 Subject: [PATCH] --- yaml --- r: 16112 b: refs/heads/master c: a106cd3d9e88c8761bd0eac2ce402cc82bd11fea h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/core/rawmidi.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 67d9437e0135..1dfcc97fd959 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: ac09a9251d3b7678150ee512de8de1bd98628d11 +refs/heads/master: a106cd3d9e88c8761bd0eac2ce402cc82bd11fea diff --git a/trunk/sound/core/rawmidi.c b/trunk/sound/core/rawmidi.c index 7a86a9a08a15..d703545cae8a 100644 --- a/trunk/sound/core/rawmidi.c +++ b/trunk/sound/core/rawmidi.c @@ -573,6 +573,8 @@ int snd_rawmidi_info_select(struct snd_card *card, struct snd_rawmidi_info *info if (info->device >= SNDRV_RAWMIDI_DEVICES) return -ENXIO; rmidi = snd_rawmidi_devices[card->number * SNDRV_RAWMIDI_DEVICES + info->device]; + if (!rmidi) + return -ENXIO; if (info->stream < 0 || info->stream > 1) return -EINVAL; pstr = &rmidi->streams[info->stream];