From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Leon Romanovsky <leon@leon.nu>
Cc: alsa-devel@alsa-project.org, Andrey Danin <danindrey@mail.ru>,
"Girdwood, Liam" <lrg@ti.com>
Subject: Re: [PATCH v3] ASoC: Add new Realtek ALC5632 CODEC driver.
Date: Tue, 1 Nov 2011 12:15:04 +0000 [thread overview]
Message-ID: <20111101121504.GC10029@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <CALq1K=JkJi_OAu-RZO1++8fXWF6xg4bHaWL=yp4a-uCnpqmFTA@mail.gmail.com>
On Tue, Nov 01, 2011 at 08:53:05AM +0200, Leon Romanovsky wrote:
> On Mon, Oct 31, 2011 at 16:28, Girdwood, Liam <lrg@ti.com> wrote:
> > On 29 October 2011 19:42, Leon Romanovsky <leon@leon.nu> wrote:
> >> + alc5632 = devm_kzalloc(&client->dev, sizeof(struct alc5632_priv), GFP_KERNEL);
> >> + if (alc5632 == NULL)
> >> + return -ENOMEM;
> >> + alc5632->id = vid2;
> >> + switch (alc5632->id) {
> >> + case 0x5c:
> >> + alc5632_dai.name = "alc5632-hifi";
> >> + break;
> >> + default:
> > Need to free resources here.
> Do I need explicit call for this?
> Is this because driver detach not called in this case?
> http://lxr.free-electrons.com/source/drivers/base/devres.c#L609
> (Memory allocated with this function is automatically freed on driver detach.)
You should be fine due to use of devm_kzalloc() - it's just that that's
a relatively new API.
prev parent reply other threads:[~2011-11-01 12:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-29 18:42 [PATCH v3] ASoC: Add new Realtek ALC5632 CODEC driver Leon Romanovsky
2011-10-31 14:28 ` Girdwood, Liam
2011-11-01 6:53 ` Leon Romanovsky
2011-11-01 12:15 ` Mark Brown [this message]
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=20111101121504.GC10029@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=danindrey@mail.ru \
--cc=leon@leon.nu \
--cc=lrg@ti.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 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.