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/layla20_dsp.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'sound/pci/echoaudio/layla20_dsp.c') diff --git a/sound/pci/echoaudio/layla20_dsp.c b/sound/pci/echoaudio/layla20_dsp.c index 7f0f6ea08ca7..f2024a3565af 100644 --- a/sound/pci/echoaudio/layla20_dsp.c +++ b/sound/pci/echoaudio/layla20_dsp.c @@ -40,7 +40,6 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) { int err; - dev_dbg(chip->card->dev, "init_hw() - Layla20\n"); if (snd_BUG_ON((subdevice_id & 0xfff0) != LAYLA20)) return -ENODEV; @@ -65,7 +64,6 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id) return err; chip->bad_board = FALSE; - dev_dbg(chip->card->dev, "init_hw done\n"); return err; } @@ -190,24 +188,19 @@ static int set_input_clock(struct echoaudio *chip, u16 clock_source) u16 clock; u32 rate; - dev_dbg(chip->card->dev, "set_input_clock:\n"); rate = 0; switch (clock_source) { case ECHO_CLOCK_INTERNAL: - dev_dbg(chip->card->dev, "Set Layla20 clock to INTERNAL\n"); rate = chip->sample_rate; clock = LAYLA20_CLOCK_INTERNAL; break; case ECHO_CLOCK_SPDIF: - dev_dbg(chip->card->dev, "Set Layla20 clock to SPDIF\n"); clock = LAYLA20_CLOCK_SPDIF; break; case ECHO_CLOCK_WORD: - dev_dbg(chip->card->dev, "Set Layla20 clock to WORD\n"); clock = LAYLA20_CLOCK_WORD; break; case ECHO_CLOCK_SUPER: - dev_dbg(chip->card->dev, "Set Layla20 clock to SUPER\n"); clock = LAYLA20_CLOCK_SUPER; break; default: @@ -232,7 +225,6 @@ static int set_input_clock(struct echoaudio *chip, u16 clock_source) static int set_output_clock(struct echoaudio *chip, u16 clock) { - dev_dbg(chip->card->dev, "set_output_clock: %d\n", clock); switch (clock) { case ECHO_CLOCK_SUPER: clock = LAYLA20_OUTPUT_CLOCK_SUPER; @@ -286,7 +278,6 @@ static int update_flags(struct echoaudio *chip) static int set_professional_spdif(struct echoaudio *chip, char prof) { - dev_dbg(chip->card->dev, "set_professional_spdif %d\n", prof); if (prof) chip->comm_page->flags |= cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF); -- cgit v1.2.1