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: <20120926210915.GA16674@kroah.com>
Date:	Wed, 26 Sep 2012 14:09:15 -0700
From:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To:	Guennadi Liakhovetski <g.liakhovetski@....de>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH/RFC/cosmetic] driver base: use available pointer

On Mon, Sep 24, 2012 at 11:48:28AM +0200, Guennadi Liakhovetski wrote:
> Don't recalculate an available pointer.
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@....de>
> ---
> diff --git a/drivers/base/platform.c b/drivers/base/platform.c
> index a1a7225..efe9aa9 100644
> --- a/drivers/base/platform.c
> +++ b/drivers/base/platform.c
> @@ -166,8 +166,8 @@ static void platform_device_release(struct device *dev)
>  	struct platform_object *pa = container_of(dev, struct platform_object,
>  						  pdev.dev);
>  
> -	of_device_node_put(&pa->pdev.dev);
> -	kfree(pa->pdev.dev.platform_data);
> +	of_device_node_put(dev);
> +	kfree(dev->platform_data);

If you don't mind, I'll leave it as-is, as it makes it a bit more
obvious as to exactly what we are cleaning up here.

thanks,

greg k-h
--
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