From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Mark Brown <broonie@kernel.org>, Shawn Guo <shawn.guo@linaro.org>,
"Anson.Huang@freescale.com" <Anson.Huang@freescale.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
Fabio Estevam <fabio.estevam@freescale.com>
Subject: Re: [PATCH v3 1/2] regulator: anatop-regulator: Fix the error handling on probe
Date: Sat, 4 Jan 2014 14:31:35 -0800 [thread overview]
Message-ID: <20140104223135.GA18213@core.coreip.homeip.net> (raw)
In-Reply-To: <CAOMZO5Bg1fMGBbYYkVTNh-ENPovkZ9t-sD92e4fGV+_oKTG9cg@mail.gmail.com>
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@gmail.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@freescale.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
prev parent reply other threads:[~2014-01-04 22:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-23 14:44 Fabio Estevam
2013-12-23 14:44 ` [PATCH v3 2/2] regulator: anatop-regulator: Remove unneeded variable Fabio Estevam
2013-12-23 14:50 ` [PATCH v3 1/2] regulator: anatop-regulator: Fix the error handling on probe Shawn Guo
2013-12-24 13:03 ` Mark Brown
2014-01-04 0:02 ` Dmitry Torokhov
2014-01-04 16:00 ` Fabio Estevam
2014-01-04 22:31 ` Dmitry Torokhov [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=20140104223135.GA18213@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=Anson.Huang@freescale.com \
--cc=broonie@kernel.org \
--cc=fabio.estevam@freescale.com \
--cc=festevam@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=shawn.guo@linaro.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
all inboxes | Powered by JetHome®