From: Andy Walls <awalls@md.metrocast.net>
To: Jarod Wilson <jarod@wilsonet.com>
Cc: "Mauro Carvalho Chehab" <mchehab@redhat.com>,
"David Härdeman" <david@hardeman.nu>,
linux-media@vger.kernel.org
Subject: Re: MCEUSB memory leak and how to tell if ir_register_input() failure registered input_dev?
Date: Sat, 03 Jul 2010 09:20:51 -0400 [thread overview]
Message-ID: <1278163251.2304.2.camel@localhost> (raw)
In-Reply-To: <AANLkTinda8JSa3XRZSSbEuj9JKVkLnRNwnW4YGBtDfWj@mail.gmail.com>
On Sun, 2010-06-27 at 23:34 -0400, Jarod Wilson wrote:
> On Sun, Jun 27, 2010 at 7:17 PM, Andy Walls <awalls@md.metrocast.net> wrote:
> > Mauro and Jarrod,
> >
> > When ir_register_input() fails, it doesn't indicate whether or not it
> > was able to register the input_dev or not. To me it looks like it can
> > return with failure with the input_dev either way depending on the case.
> > This makes proper cleanup of the input_dev in my cx23885_input_init()
> > function difficult in the failure case, since the input subsystem has
> > two different deallocators depending on if the device had been
> > registered or not.
>
> Hm. I've done a double-take a few times now, but if
> input_register_device is successful, and something later in
> __ir_input_register fails, input_unregister_device *does* get called
> within __ir_input_register, so all you should have to do is call
> input_free_device in your init function's error path, no?
I couldn't quite tell (with the constant stream of intteruptions I get
at times). That's why I asked. :)
I'll double check today once I'm done with getting the CX23888 IR Tx
working.
Regards,
Andy
next prev parent reply other threads:[~2010-07-03 13:20 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-07 19:32 [PATCH 0/8] rc-core cleanups David Härdeman
2010-06-07 19:32 ` [PATCH 1/8] ir-core: convert mantis to not use ir-functions.c David Härdeman
2010-06-07 19:32 ` [PATCH 2/8] ir-core: convert em28xx " David Härdeman
2010-06-27 10:23 ` Mauro Carvalho Chehab
2010-06-27 11:19 ` Mauro Carvalho Chehab
2010-06-07 19:32 ` [PATCH 3/8] ir-core: partially convert cx88 " David Härdeman
2010-06-07 19:32 ` [PATCH 4/8] ir-core: partially convert ir-kbd-i2c.c " David Härdeman
2010-06-07 19:32 ` [PATCH 5/8] ir-core: partially convert bt8xx " David Härdeman
2010-06-27 12:11 ` Mauro Carvalho Chehab
2010-06-27 15:14 ` Andy Walls
2010-06-28 1:26 ` Mauro Carvalho Chehab
2010-06-27 20:17 ` Jarod Wilson
2010-06-27 21:37 ` Andy Walls
2010-06-27 23:17 ` MCEUSB memory leak and how to tell if ir_register_input() failure registered input_dev? Andy Walls
2010-06-28 3:34 ` Jarod Wilson
2010-07-03 13:20 ` Andy Walls [this message]
2010-06-07 19:32 ` [PATCH 6/8] ir-core: centralize sysfs raw decoder enabling/disabling David Härdeman
2010-06-07 19:32 ` [PATCH 7/8] ir-core: move decoding state to ir_raw_event_ctrl David Härdeman
2010-06-07 19:32 ` [PATCH 8/8] ir-core: merge rc-map.h into ir-core.h David Härdeman
2010-06-28 17:45 ` Mauro Carvalho Chehab
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=1278163251.2304.2.camel@localhost \
--to=awalls@md.metrocast.net \
--cc=david@hardeman.nu \
--cc=jarod@wilsonet.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.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.