[alsa-devel] [PATCH] ASoC: wm8962: Convert to devm_input_allocate_device()
Leon Romanovsky
leon at leon.nu
Wed Apr 24 15:50:48 CEST 2013
Hi Mark,
On Thu, Dec 20, 2012 at 4:18 PM, Mark Brown
<broonie at opensource.wolfsonmicro.com> wrote:
> Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
> ---
> sound/soc/codecs/wm8962.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
> index 50b0983..1cee9b3 100644
> --- a/sound/soc/codecs/wm8962.c
> +++ b/sound/soc/codecs/wm8962.c
> @@ -3210,7 +3210,6 @@ static void wm8962_init_beep(struct snd_soc_codec *codec)
>
> 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.
--
Leon Romanovsky | Independent Linux Consultant
www.leon.nu | leon at leon.nu
More information about the Alsa-devel
mailing list