From 9161bd0d1cf375492f0a6aa86b3e4c28b070fb7c Mon Sep 17 00:00:00 2001 From: Sudip Mukherjee Date: Wed, 5 Nov 2014 19:51:56 +0530 Subject: ALSA: echoaudio: cleanup of unnecessary messages commit "b5b4a41b392960010fccf1f9ccf8334d612bd450" was dereferencing chip after it has been freed. This patch fixes that and at the same time removes some debugging messages, which are unnecessary, as they are just printing information about entry and exit from a function, and which switch-case it is executing. we can easily get from ftrace the information about the entry and exit from a function. Reported-by: Dan Carpenter Signed-off-by: Sudip Mukherjee Signed-off-by: Takashi Iwai --- sound/pci/echoaudio/midi.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'sound/pci/echoaudio/midi.c') diff --git a/sound/pci/echoaudio/midi.c b/sound/pci/echoaudio/midi.c index 8d43c5a4976b..d913749d154a 100644 --- a/sound/pci/echoaudio/midi.c +++ b/sound/pci/echoaudio/midi.c @@ -157,7 +157,6 @@ static int snd_echo_midi_input_open(struct snd_rawmidi_substream *substream) struct echoaudio *chip = substream->rmidi->private_data; chip->midi_in = substream; - dev_dbg(chip->card->dev, "rawmidi_iopen\n"); return 0; } @@ -183,7 +182,6 @@ static int snd_echo_midi_input_close(struct snd_rawmidi_substream *substream) struct echoaudio *chip = substream->rmidi->private_data; chip->midi_in = NULL; - dev_dbg(chip->card->dev, "rawmidi_iclose\n"); return 0; } @@ -196,7 +194,6 @@ static int snd_echo_midi_output_open(struct snd_rawmidi_substream *substream) chip->tinuse = 0; chip->midi_full = 0; chip->midi_out = substream; - dev_dbg(chip->card->dev, "rawmidi_open\n"); return 0; } @@ -209,7 +206,6 @@ static void snd_echo_midi_output_write(unsigned long data) int bytes, sent, time; unsigned char buf[MIDI_OUT_BUFFER_SIZE - 1]; - dev_dbg(chip->card->dev, "snd_echo_midi_output_write\n"); /* No interrupts are involved: we have to check at regular intervals if the card's output buffer has room for new data. */ sent = bytes = 0; @@ -288,7 +284,6 @@ static int snd_echo_midi_output_close(struct snd_rawmidi_substream *substream) struct echoaudio *chip = substream->rmidi->private_data; chip->midi_out = NULL; - dev_dbg(chip->card->dev, "rawmidi_oclose\n"); return 0; } @@ -328,6 +323,5 @@ static int snd_echo_midi_create(struct snd_card *card, chip->rmidi->info_flags |= SNDRV_RAWMIDI_INFO_OUTPUT | SNDRV_RAWMIDI_INFO_INPUT | SNDRV_RAWMIDI_INFO_DUPLEX; - dev_dbg(chip->card->dev, "MIDI ok\n"); return 0; } -- cgit v1.2.3