From: Mark Brown <broonie@kernel.org>
To: Leon Romanovsky <leon@leon.nu>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
patches@opensource.wolfsonmicro.com, Liam Girdwood <lrg@ti.com>
Subject: Re: [PATCH] ASoC: wm8962: Convert to devm_input_allocate_device()
Date: Thu, 25 Apr 2013 13:52:34 +0100 [thread overview]
Message-ID: <20130425125234.GV5019@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <CALq1K=+sJUZ++_sMkU1Sg9+aE-HpF1tnfPHGCEJ789hj19Yp9A@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 852 bytes --]
On Wed, Apr 24, 2013 at 04:50:48PM +0300, Leon Romanovsky wrote:
> On Thu, Dec 20, 2012 at 4:18 PM, Mark Brown
> > ret = input_register_device(wm8962->beep);
> > if (ret != 0) {
> > - input_free_device(wm8962->beep);
> > wm8962->beep = NULL;
> > dev_err(codec->dev, "Failed to register beep device\n");
> > }
> I'm not sure if this patch is correct.
> According to comment of input_free_memory()
> (http://lxr.free-electrons.com/source/drivers/input/input.c#L1825) you
> need to call it if input_register_device failed.
This seems like a bug that should be fixed on the API side, it's really
not what you'd expect a devm function to do, and if you are explicitly
freeing a devm allocated object there's an expectation that you need to
call a corresponding devm cleanup function.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2013-04-25 12:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-20 13:18 [PATCH] ASoC: wm8962: Convert to devm_input_allocate_device() Mark Brown
2013-04-24 13:50 ` Leon Romanovsky
2013-04-25 12:52 ` Mark Brown [this message]
2013-04-28 5:00 ` Leon Romanovsky
2013-04-28 9:47 ` Mark Brown
2013-04-28 18:32 ` Leon Romanovsky
2013-04-29 10:19 ` Mark Brown
2013-04-29 17:47 ` [alsa-devel] " Leon Romanovsky
2013-04-29 18:07 ` Dmitry Torokhov
2013-04-29 18:19 ` Dmitry Torokhov
2013-04-29 18:52 ` Leon Romanovsky
2013-04-29 20:01 ` Mark Brown
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=20130425125234.GV5019@opensource.wolfsonmicro.com \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=leon@leon.nu \
--cc=lrg@ti.com \
--cc=patches@opensource.wolfsonmicro.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