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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 15 Sep 2021 11:07:02 +0800
From:   Trevor Wu <trevor.wu@...iatek.com>
To:     Bixuan Cui <cuibixuan@...wei.com>,
        <linux-mediatek@...ts.infradead.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
CC:     <lgirdwood@...il.com>, <broonie@...nel.org>, <perex@...ex.cz>,
        <tiwai@...e.com>, <matthias.bgg@...il.com>,
        <alsa-devel@...a-project.org>
Subject: Re: [PATCH -next] ASoC: mediatek: mt8195: Add missing of_node_put()

Hi Bixuan,

Thanks for catching that.
I found there are other usages of of_parse_phandle() in the file.
Will you handle them together?
If not, I will prepare a patch to fix them after this patch is merged.

Thanks,
Trevor

On Sat, 2021-09-11 at 16:12 +0800, Bixuan Cui wrote:
> The platform_node is returned by of_parse_phandle() should have
> of_node_put() before return.
> 
> Reported-by: Hulk Robot <hulkci@...wei.com>
> Signed-off-by: Bixuan Cui <cuibixuan@...wei.com>
> ---
>  sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c
> b/sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c
> index c97ace7387b4..8cd8450409e8 100644
> --- a/sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c
> +++ b/sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c
> @@ -1041,8 +1041,10 @@ static int
> mt8195_mt6359_rt1019_rt5682_dev_probe(struct platform_device *pdev)
>  	}
>  
>  	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
> -	if (!priv)
> +	if (!priv) {
> +		of_node_put(platform_node);
>  		return -ENOMEM;
> +	}
>  
>  	snd_soc_card_set_drvdata(card, priv);
>  
> @@ -1050,6 +1052,8 @@ static int
> mt8195_mt6359_rt1019_rt5682_dev_probe(struct platform_device *pdev)
>  	if (ret)
>  		dev_err(&pdev->dev, "%s snd_soc_register_card fail
> %d\n",
>  			__func__, ret);
> +
> +	of_node_put(platform_node);
>  	return ret;
>  }
>  

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ