From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Libo Chen <clbchenlibo.chen@huawei.com>
Cc: dmitry.torokhov@gmail.com, Bill Pemberton <wfp5p@virginia.edu>,
broonie@opensource.wolfsonmicro.com, javier@dowhile0.org,
linux-input@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Li Zefan <lizefan@huawei.com>,
"zhangwei(Jovi)" <jovi.zhangwei@huawei.com>
Subject: Re: [PATCH 3/3] driver: input: twl6040-vibra: fix missing of_node_put
Date: Sun, 1 Sep 2013 19:59:58 +0300 [thread overview]
Message-ID: <5223728E.8000905@ti.com> (raw)
In-Reply-To: <522190F1.3010103@huawei.com>
On 08/31/2013 09:45 AM, Libo Chen wrote:
>
> decrease twl6040_core_node device_node refcount after task completion
>
> There are two ways to implement the function of_node_put through
> the marco CONFIG_OF_DYNAMIC, so it is save to call directly.
>
> Signed-off-by: Libo Chen <libo.chen@huawei.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
> drivers/input/misc/twl6040-vibra.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c
> index 0c2dfc8..f16193a 100644
> --- a/drivers/input/misc/twl6040-vibra.c
> +++ b/drivers/input/misc/twl6040-vibra.c
> @@ -271,12 +271,14 @@ static int twl6040_vibra_probe(struct platform_device *pdev)
> #endif
>
> if (!pdata && !twl6040_core_node) {
> + of_node_put(twl6040_core_node);
> dev_err(&pdev->dev, "platform_data not available\n");
> return -EINVAL;
> }
>
> info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
> if (!info) {
> + of_node_put(twl6040_core_node);
> dev_err(&pdev->dev, "couldn't allocate memory\n");
> return -ENOMEM;
> }
> @@ -304,6 +306,7 @@ static int twl6040_vibra_probe(struct platform_device *pdev)
> &vddvibl_uV);
> of_property_read_u32(twl6040_core_node, "ti,vddvibr-uV",
> &vddvibr_uV);
> + of_node_put(twl6040_core_node);
> }
>
> if ((!info->vibldrv_res && !info->viblmotor_res) ||
>
--
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2013-09-01 17:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-31 6:45 [PATCH 3/3] driver: input: twl6040-vibra: fix missing of_node_put Libo Chen
2013-09-01 16:59 ` Peter Ujfalusi [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=5223728E.8000905@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=clbchenlibo.chen@huawei.com \
--cc=dmitry.torokhov@gmail.com \
--cc=javier@dowhile0.org \
--cc=jovi.zhangwei@huawei.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lizefan@huawei.com \
--cc=wfp5p@virginia.edu \
/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;
as well as URLs for NNTP newsgroup(s).