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: <bb5db04c-cfbc-cca3-929d-6acad64c9219@ti.com>
Date:   Thu, 16 Nov 2017 16:53:36 +0530
From:   Keerthy <j-keerthy@...com>
To:     Axel Lin <axel.lin@...ics.com>, Mark Brown <broonie@...nel.org>
CC:     Liam Girdwood <lgirdwood@...il.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] regulator: tps65218: Add NULL test for devm_kzalloc call



On Monday 13 November 2017 06:22 PM, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@...ics.com>

One line commit message would be better than blank commit message.
Otherwise:

Reviewed-by: Keerthy <j-keerthy@...com>

> ---
>  drivers/regulator/tps65218-regulator.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/regulator/tps65218-regulator.c b/drivers/regulator/tps65218-regulator.c
> index bc489958fed7..b3f89ebfb1a0 100644
> --- a/drivers/regulator/tps65218-regulator.c
> +++ b/drivers/regulator/tps65218-regulator.c
> @@ -329,6 +329,8 @@ static int tps65218_regulator_probe(struct platform_device *pdev)
>  	/* Allocate memory for strobes */
>  	tps->strobes = devm_kzalloc(&pdev->dev, sizeof(u8) *
>  				    TPS65218_NUM_REGULATOR, GFP_KERNEL);
> +	if (!tps->strobes)
> +		return -ENOMEM;
>  
>  	for (i = 0; i < ARRAY_SIZE(regulators); i++) {
>  		rdev = devm_regulator_register(&pdev->dev, &regulators[i],
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ