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: <20130523083751.GC22683@gmail.com>
Date:	Thu, 23 May 2013 09:37:51 +0100
From:	Lee Jones <lee.jones@...aro.org>
To:	Leon Romanovsky <leon@...n.nu>
Cc:	sameo@...ux.intel.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers: mfd: tps65912: Convert to use devm_kzalloc

On Wed, 15 May 2013, Leon Romanovsky wrote:

> There is no need to call kfree while using devm_kzalloc,
> remove it from *_device_init function.
> 
> Signed-off-by: Leon Romanovsky <leon@...n.nu>
> ---
>  drivers/mfd/tps65912-core.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/mfd/tps65912-core.c b/drivers/mfd/tps65912-core.c
> index aeb8e40..f25e552 100644
> --- a/drivers/mfd/tps65912-core.c
> +++ b/drivers/mfd/tps65912-core.c
> @@ -127,7 +127,8 @@ int tps65912_device_init(struct tps65912 *tps65912)
>  	struct tps65912_platform_data *init_data;
>  	int ret, dcdc_avs, value;
>  
> -	init_data = kzalloc(sizeof(struct tps65912_platform_data), GFP_KERNEL);
> +	init_data = devm_kzalloc(&tps65912->dev,
> +			sizeof(struct tps65912_platform_data), GFP_KERNEL);

On second thoughts, have you actually built this?

-- 
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ