From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH/RFC/cosmetic] driver base: use available pointer
Date: Wed, 26 Sep 2012 14:09:15 -0700 [thread overview]
Message-ID: <20120926210915.GA16674@kroah.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1209241145210.11925@axis700.grange>
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@gmx.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
prev parent reply other threads:[~2012-09-26 21:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-24 9:48 [PATCH/RFC/cosmetic] driver base: use available pointer Guennadi Liakhovetski
2012-09-26 21:09 ` Greg Kroah-Hartman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120926210915.GA16674@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=g.liakhovetski@gmx.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox