[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140104223135.GA18213@core.coreip.homeip.net>
Date: Sat, 4 Jan 2014 14:31:35 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Fabio Estevam <festevam@...il.com>
Cc: Mark Brown <broonie@...nel.org>, Shawn Guo <shawn.guo@...aro.org>,
"Anson.Huang@...escale.com" <Anson.Huang@...escale.com>,
linux-kernel <linux-kernel@...r.kernel.org>,
Fabio Estevam <fabio.estevam@...escale.com>
Subject: Re: [PATCH v3 1/2] regulator: anatop-regulator: Fix the error
handling on probe
On Sat, Jan 04, 2014 at 02:00:52PM -0200, Fabio Estevam wrote:
> Hi Dmitry,
>
> On Fri, Jan 3, 2014 at 10:02 PM, Dmitry Torokhov
> <dmitry.torokhov@...il.com> wrote:
> > On Tue, Dec 24, 2013 at 01:03:57PM +0000, Mark Brown wrote:
> >> On Mon, Dec 23, 2013 at 12:44:40PM -0200, Fabio Estevam wrote:
> >> > From: Fabio Estevam <fabio.estevam@...escale.com>
> >> >
> >> > Currently when of_get_parent() or syscon_node_to_regmap() fail
> >> > 'kfree(sreg->name)' is not called, which is incorrect.
> >>
> >> Applied both, thanks.
> >
> > Sorry for being too later, but why are we making copy to begin with? It
> > is not like DT data will disappear later on.
>
> Which lines of code are you referring to, please?
I am talking about this:
sreg->name = kstrdup(of_get_property(np, "regulator-name", NULL),
GFP_KERNEL);
Whatis the reason for kstrdup? Can we simply say:
sreg->name = of_get_property(np, "regulator-name", NULL);
Thanks.
--
Dmitry
--
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