All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: ALSA: echoaudio: remove all snd_printk
@ 2014-11-04 16:01 Dan Carpenter
  2014-11-04 16:15 ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2014-11-04 16:01 UTC (permalink / raw)
  To: sudipm.mukherjee; +Cc: alsa-devel

Hello Sudip Mukherjee,

The patch b5b4a41b3929: "ALSA: echoaudio: remove all snd_printk" from
Nov 3, 2014, leads to the following static checker warning:

	sound/pci/echoaudio/echoaudio.c:1908 snd_echo_free()
	error: dereferencing freed memory 'chip'

sound/pci/echoaudio/echoaudio.c
  1905          /* release chip data */
  1906          free_firmware_cache(chip);
  1907          kfree(chip);
                ^^^^^^^^^^^
  1908          dev_dbg(chip->card->dev, "Chip freed.\n");
                        ^^^^^^^^^^

We have lots of printks in this function.  We could just delete them all
and no one would care.  These days you can get the same information from
ftrace.

  1909          return 0;
  1910  }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ALSA: echoaudio: remove all snd_printk
  2014-11-04 16:01 ALSA: echoaudio: remove all snd_printk Dan Carpenter
@ 2014-11-04 16:15 ` Takashi Iwai
  2014-11-04 17:11   ` Sudip Mukherjee
  0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2014-11-04 16:15 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: alsa-devel, sudipm.mukherjee

At Tue, 4 Nov 2014 19:01:56 +0300,
Dan Carpenter wrote:
> 
> Hello Sudip Mukherjee,
> 
> The patch b5b4a41b3929: "ALSA: echoaudio: remove all snd_printk" from
> Nov 3, 2014, leads to the following static checker warning:
> 
> 	sound/pci/echoaudio/echoaudio.c:1908 snd_echo_free()
> 	error: dereferencing freed memory 'chip'
> 
> sound/pci/echoaudio/echoaudio.c
>   1905          /* release chip data */
>   1906          free_firmware_cache(chip);
>   1907          kfree(chip);
>                 ^^^^^^^^^^^
>   1908          dev_dbg(chip->card->dev, "Chip freed.\n");
>                         ^^^^^^^^^^
> 
> We have lots of printks in this function.  We could just delete them all
> and no one would care.  These days you can get the same information from
> ftrace.

Yep, maybe it's a wiser choice.  Sudip, care to send a clean up patch?


thanks,

Takashi

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ALSA: echoaudio: remove all snd_printk
  2014-11-04 16:15 ` Takashi Iwai
@ 2014-11-04 17:11   ` Sudip Mukherjee
  0 siblings, 0 replies; 3+ messages in thread
From: Sudip Mukherjee @ 2014-11-04 17:11 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel, Dan Carpenter

On Tue, Nov 04, 2014 at 05:15:20PM +0100, Takashi Iwai wrote:
> At Tue, 4 Nov 2014 19:01:56 +0300,
> Dan Carpenter wrote:
> > 
> > Hello Sudip Mukherjee,
> > 
> > The patch b5b4a41b3929: "ALSA: echoaudio: remove all snd_printk" from
> > Nov 3, 2014, leads to the following static checker warning:
> > 
> > 	sound/pci/echoaudio/echoaudio.c:1908 snd_echo_free()
> > 	error: dereferencing freed memory 'chip'
> > 
> > sound/pci/echoaudio/echoaudio.c
> >   1905          /* release chip data */
> >   1906          free_firmware_cache(chip);
> >   1907          kfree(chip);
> >                 ^^^^^^^^^^^
> >   1908          dev_dbg(chip->card->dev, "Chip freed.\n");
> >                         ^^^^^^^^^^

oops , missed it. sorry.

> > 
> > We have lots of printks in this function.  We could just delete them all
> > and no one would care.  These days you can get the same information from
> > ftrace.
> 
> Yep, maybe it's a wiser choice.  Sudip, care to send a clean up patch?
> 
sure. i have alredy started. cleanup like Joe Perches suggested from all the functions.

thanks
sudip

> 
> thanks,
> 
> Takashi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-04 17:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-04 16:01 ALSA: echoaudio: remove all snd_printk Dan Carpenter
2014-11-04 16:15 ` Takashi Iwai
2014-11-04 17:11   ` Sudip Mukherjee

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.