public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Samuel Ortiz <sameo@linux.intel.com>
Cc: Andres Salomon <dilinger@queued.net>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Grant Likely <grant.likely@secretlab.ca>
Subject: Re: [RFC] [PATCH] mfd: Fetch cell pointer from platform_device->mfd_cell
Date: Fri, 8 Apr 2011 15:59:28 -0700	[thread overview]
Message-ID: <20110408225928.GA28190@suse.de> (raw)
In-Reply-To: <20110408225451.GC30969@sortiz-mobl>

On Sat, Apr 09, 2011 at 12:54:52AM +0200, Samuel Ortiz wrote:
> Hi Andres,
> 
> On Thu, Apr 07, 2011 at 07:38:55PM -0700, Andres Salomon wrote:
> > > diff --git a/drivers/base/platform.c b/drivers/base/platform.c
> > > index f051cff..6c3a2bd 100644
> > > --- a/drivers/base/platform.c
> > > +++ b/drivers/base/platform.c
> > > @@ -149,6 +149,7 @@ static void platform_device_release(struct device
> > > *dev) 
> > >  	of_device_node_put(&pa->pdev.dev);
> > >  	kfree(pa->pdev.dev.platform_data);
> > > +	kfree(pa->pdev.mfd_cell);
> > 
> > Hm, given that most platform devices won't be mfd devices (and thus
> > mfd_cell will be NULL), is it better to rely on kfree's
> > unlikely(ZERO_OR_NULL_PTR(...)), or have this be "if
> > (pa->pdev.mfd_cell) kfree(pa->pdev.mfd_cell);"?
> I'd say the former (obviously), unless Greg wants it to be otherwise.

Yes, as the patch was originally written is fine with me.

thanks,

greg k-h

  reply	other threads:[~2011-04-08 22:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08  0:40 [RFC] [PATCH] mfd: Fetch cell pointer from platform_device->mfd_cell Samuel Ortiz
2011-04-08  2:38 ` Andres Salomon
2011-04-08 22:54   ` Samuel Ortiz
2011-04-08 22:59     ` Greg KH [this message]
2011-04-08 23:11   ` [PATCH v1] " Samuel Ortiz
2011-04-09  2:16     ` Greg KH
2011-04-09  6:26       ` Grant Likely
2011-04-11  8:45       ` Samuel Ortiz

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=20110408225928.GA28190@suse.de \
    --to=gregkh@suse.de \
    --cc=dilinger@queued.net \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    /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