From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Arjun Sreedharan <arjun024@gmail.com>
Cc: lejun.zhu@linux.intel.com, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remove explicit devm_kfree
Date: Fri, 15 Aug 2014 09:51:58 -0700 [thread overview]
Message-ID: <20140815165158.GA25225@core.coreip.homeip.net> (raw)
In-Reply-To: <1408116365-3013-1-git-send-email-arjun024@gmail.com>
On Fri, Aug 15, 2014 at 08:56:05PM +0530, Arjun Sreedharan wrote:
> Memory allocated with devm_kzalloc() is freed automatically when device
> out of scope.
But in this case the device does not necessarily goes "out of scope" and we
still want to release memory.
Thanks.
>
> Signed-off-by: Arjun Sreedharan <arjun024@gmail.com>
> ---
> drivers/input/misc/soc_button_array.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
> index 5a6334b..123e59f 100644
> --- a/drivers/input/misc/soc_button_array.c
> +++ b/drivers/input/misc/soc_button_array.c
> @@ -131,7 +131,6 @@ soc_button_device_create(struct pnp_dev *pdev,
> err_free_pdev:
> platform_device_put(pd);
> err_free_mem:
> - devm_kfree(&pdev->dev, gpio_keys_pdata);
> return ERR_PTR(error);
> }
>
> --
> 1.7.11.7
>
--
Dmitry
prev parent reply other threads:[~2014-08-15 16:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-15 15:26 [PATCH] remove explicit devm_kfree Arjun Sreedharan
2014-08-15 16:51 ` 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=20140815165158.GA25225@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=arjun024@gmail.com \
--cc=lejun.zhu@linux.intel.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).