diff options
Diffstat (limited to 'sound/isa/wavefront/wavefront_midi.c')
-rw-r--r-- | sound/isa/wavefront/wavefront_midi.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/sound/isa/wavefront/wavefront_midi.c b/sound/isa/wavefront/wavefront_midi.c index a337a86f7a65..72e775ac7ad7 100644 --- a/sound/isa/wavefront/wavefront_midi.c +++ b/sound/isa/wavefront/wavefront_midi.c @@ -239,7 +239,8 @@ static int snd_wavefront_midi_input_open(struct snd_rawmidi_substream *substream mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); - if ((midi = get_wavefront_midi (substream)) == NULL) + midi = get_wavefront_midi(substream); + if (!midi) return -EIO; spin_lock_irqsave (&midi->open, flags); @@ -263,7 +264,8 @@ static int snd_wavefront_midi_output_open(struct snd_rawmidi_substream *substrea mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); - if ((midi = get_wavefront_midi (substream)) == NULL) + midi = get_wavefront_midi(substream); + if (!midi) return -EIO; spin_lock_irqsave (&midi->open, flags); @@ -287,7 +289,8 @@ static int snd_wavefront_midi_input_close(struct snd_rawmidi_substream *substrea mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); - if ((midi = get_wavefront_midi (substream)) == NULL) + midi = get_wavefront_midi(substream); + if (!midi) return -EIO; spin_lock_irqsave (&midi->open, flags); @@ -310,7 +313,8 @@ static int snd_wavefront_midi_output_close(struct snd_rawmidi_substream *substre mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); - if ((midi = get_wavefront_midi (substream)) == NULL) + midi = get_wavefront_midi(substream); + if (!midi) return -EIO; spin_lock_irqsave (&midi->open, flags); @@ -333,9 +337,9 @@ static void snd_wavefront_midi_input_trigger(struct snd_rawmidi_substream *subst mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); - if ((midi = get_wavefront_midi (substream)) == NULL) { + midi = get_wavefront_midi(substream); + if (!midi) return; - } spin_lock_irqsave (&midi->virtual, flags); if (up) { @@ -372,9 +376,9 @@ static void snd_wavefront_midi_output_trigger(struct snd_rawmidi_substream *subs mpu = *((snd_wavefront_mpu_id *) substream->rmidi->private_data); - if ((midi = get_wavefront_midi (substream)) == NULL) { + midi = get_wavefront_midi(substream); + if (!midi) return; - } spin_lock_irqsave (&midi->virtual, flags); if (up) { |