Re: [PATCH/RFC/cosmetic] driver base: use available pointer

From: Greg Kroah-Hartman
Date: Wed Sep 26 2012 - 17:09:11 EST


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@xxxxxx>
> ---
> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/