mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Jaroslav Kysela <perex@perex.cz>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: korg1212: cleanup of printk
Date: Mon, 10 Nov 2014 11:06:02 +0100	[thread overview]
Message-ID: <s5hd28vpdyt.wl-tiwai@suse.de> (raw)
In-Reply-To: <20141110072026.GA12553@sudip-PC>

At Mon, 10 Nov 2014 12:50:26 +0530,
Sudip Mukherjee wrote:
> 
> hi Takashi,
> I have a doubt regarding this korg1212.
> snd_korg1212_free_pcm is just making korg1212->pcm as NULL. But are we not supposed to release the allocated memory ?
> in snd_pcm_new we are allocating memory.

The allocated memories by snd_pcm_new() are freed automatically.
The private_free callback is for extra memory that is allocated in the
outside.  But in this case, it's the chip object that will be freed
snd_korg1212_dev_free(), so snd_korg1212_free_pcm() doesn't do
anything.  (Actually it can be dropped.)


Takashi

  reply	other threads:[~2014-11-10 10:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-10  7:14 Sudip Mukherjee
2014-11-10  7:20 ` Sudip Mukherjee
2014-11-10 10:06   ` Takashi Iwai [this message]
2014-11-10 10:10 ` Takashi Iwai
2014-11-10 10:21   ` Sudip Mukherjee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hd28vpdyt.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=sudipm.mukherjee@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome