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] [day] [month] [year] [list]
Message-ID: <20201019134318.GB4904@sirena.org.uk>
Date:   Mon, 19 Oct 2020 14:43:18 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Defang Bo <bodefang@....com>
Cc:     lgirdwood@...il.com, perex@...ex.cz, tiwai@...e.com,
        Vishnuvardhanrao.Ravulapati@....com, akshu.agrawal@....com,
        alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC: amd: move the call to devm_kzalloc below
 platform_get_resource()

On Mon, Oct 19, 2020 at 08:31:29PM +0800, Defang Bo wrote:

> Just as the commit <4cb79ef9c6c4>("ASoC: amd: Fix potential NULL pointer dereference"),it makes no sense to allocate any resources if res = platform_get_resource(pdev, IORESOURCE_MEM, 0); fails,so move the call to devm_kzalloc() below the mentioned code.

Please keep your commit message wrapped at below 80 columns.

> -	if (!adata)
> -		return -ENOMEM;
> -
>  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	if (!res) {
>  		dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n");
>  		return -ENOMEM;
>  	}
> +	adata = devm_kzalloc(&pdev->dev, sizeof(struct i2s_dev_data), GFP_KERNEL);

This is missing a blank line between the two code blocks.

Download attachment "signature.asc" of type "application/pgp-signature" (485 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ