lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <35848cb7-36ee-6698-ff17-7f0e73567914@nvidia.com>
Date:   Wed, 17 Oct 2018 13:32:37 +0100
From:   Jon Hunter <jonathanh@...dia.com>
To:     Marcel Ziswiler <marcel@...wiler.com>,
        <devicetree@...r.kernel.org>, <linux-tegra@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
CC:     Russell King - ARM Linux <linux@...linux.org.uk>,
        Mark Brown <broonie@...nel.org>,
        Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
        Marcel Ziswiler <marcel.ziswiler@...adex.com>,
        Jaroslav Kysela <perex@...ex.cz>,
        <alsa-devel@...a-project.org>,
        Thierry Reding <thierry.reding@...il.com>,
        Takashi Iwai <tiwai@...e.com>,
        Liam Girdwood <lgirdwood@...il.com>
Subject: Re: [PATCH v2 9/9] ASoC: tegra_sgtl5000: fix platform name vs.
 of_node assignement


On 16/10/2018 11:47, Marcel Ziswiler wrote:
> From: Marcel Ziswiler <marcel.ziswiler@...adex.com>
> 
> This fixes the following error as seen post commit daecf46ee0e5
> ("ASoC: soc-core: use snd_soc_dai_link_component for platform"):
> 
> tegra-snd-sgtl5000 sound: ASoC: Both platform name/of_node are set for
>  sgtl5000
> tegra-snd-sgtl5000 sound: ASoC: failed to init link sgtl5000
> tegra-snd-sgtl5000 sound: snd_soc_register_card failed (-22)
> tegra-snd-sgtl5000: probe of sound failed with error -22
> 
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@...adex.com>
> 
> ---
> 
> Changes in v2: New patch
> 
>  sound/soc/tegra/tegra_sgtl5000.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/sound/soc/tegra/tegra_sgtl5000.c b/sound/soc/tegra/tegra_sgtl5000.c
> index 901457da25ec..eb702925cac3 100644
> --- a/sound/soc/tegra/tegra_sgtl5000.c
> +++ b/sound/soc/tegra/tegra_sgtl5000.c
> @@ -168,6 +168,11 @@ static int tegra_sgtl5000_driver_probe(struct platform_device *pdev)
>  	return 0;
>  
>  err_fini_utils:
> +	if (tegra_sgtl5000_dai.platform) {
> +		devm_kfree(&pdev->dev, tegra_sgtl5000_dai.platform);
> +		tegra_sgtl5000_dai.platform = NULL;
> +	}
> +
>  	tegra_asoc_utils_fini(&machine->util_data);
>  err_put_cpu_of_node:
>  	of_node_put(tegra_sgtl5000_dai.cpu_of_node);
>

Where is the above allocated? I don't see it allocated in this driver
AFAICT. If it is not then it does not seem right to free something that
we have not allocated in this driver. I would have assumed it was
allocated by snd_soc_init_platform() in which case it should not be
necessary to free because that function uses devm_kzalloc(). What am I
missing here?

Cheers
Jon

-- 
nvpublic

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ