From: Lars-Peter Clausen <lars@metafoo.de>
To: Huqiu Liu <liuhq11@mails.tsinghua.edu.cn>
Cc: yinj2010@gmail.com, Linux Input <linux-input@vger.kernel.org>
Subject: Re: hello, please help me check this potential bug, thanks.
Date: Mon, 30 Dec 2013 14:45:08 +0100 [thread overview]
Message-ID: <52C178E4.3060201@metafoo.de> (raw)
In-Reply-To: <52C11B36.167D70.09200@tsinghua.edu.cn>
Added linux-input to Cc
On 12/30/2013 08:05 AM, Huqiu Liu wrote:
> Dear Lars-Peter Clausen,
> I'm very sorry to trouble you. Recently I checked lots of drivers and found the
> following potential bug:
> 1) In the file _/drivers\input\misc\pwm-beeper.c/_, the function
> *input_allocate_device * is called by the function *pwm_beeper_probe*. While the
> function *pwm_beeper_remove * does not call the function *input_free_device * to
> release the acquired resources when removing the device. Generelly the function
> *input_free_device * and *input_allocate_device * should be used in pairs, and
> more than *109 * drivers have called the function *input_free_device * to
> release the resources which are acquired by the function *input_allocate_device*.
> The acqured resources are ignored to be released when removing the device, which
> would cause memory leaks and other potential problems. Could you help me to
> check or confirm this bug please? Thank you very much. I'm looking forward to
> your reply.
I think the code is corect. See the input_allocate_device() documentation:
* input_allocate_device - allocate memory for new input device
*
* Returns prepared struct input_dev or %NULL.
*
* NOTE: Use input_free_device() to free devices that have not been
* registered; input_unregister_device() should be used for already
* registered devices.
- Lars
parent reply other threads:[~2013-12-30 13:42 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <52C11B36.167D70.09200@tsinghua.edu.cn>]
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=52C178E4.3060201@metafoo.de \
--to=lars@metafoo.de \
--cc=linux-input@vger.kernel.org \
--cc=liuhq11@mails.tsinghua.edu.cn \
--cc=yinj2010@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.