[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110408225928.GA28190@suse.de>
Date: Fri, 8 Apr 2011 15:59:28 -0700
From: Greg KH <gregkh@...e.de>
To: Samuel Ortiz <sameo@...ux.intel.com>
Cc: Andres Salomon <dilinger@...ued.net>,
linux-kernel <linux-kernel@...r.kernel.org>,
Grant Likely <grant.likely@...retlab.ca>
Subject: Re: [RFC] [PATCH] mfd: Fetch cell pointer from
platform_device->mfd_cell
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
--
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