From: "Henrik Rydberg" <rydberg@euromail.se>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH] Input: introduce managed input devices (add devres support)
Date: Mon, 29 Oct 2012 22:32:54 +0100 [thread overview]
Message-ID: <20121029213254.GA15390@polaris.bitmath.org> (raw)
In-Reply-To: <20121029204023.GB13256@core.coreip.homeip.net>
> > Either way, the code looks functional to me.
>
> So is that "reviewed-by"?
I was thinking about this hunk:
> @@ -1972,7 +2084,20 @@ int input_register_device(struct input_dev *dev)
>
> mutex_unlock(&input_mutex);
>
> + if (dev->devres_managed) {
> + dev_info(dev->dev.parent, "%s: registerign %s with devres.\n",
> + __func__, dev->name ?: "N/A");
> + devres_add(dev->dev.parent, devres);
> + }
> return 0;
> +
> +err_device_del:
> + device_del(&dev->dev);
> +err_free_vals:
> + kfree(dev->vals);
Won't this yield a double free once we reach release()?
> +err_devres_free:
> + devres_free(devres);
> + return error;
> }
> EXPORT_SYMBOL(input_register_device);
Thanks,
Henrik
next prev parent reply other threads:[~2012-10-29 21:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-23 5:35 [PATCH] Input: introduce managed input devices (add devres support) Dmitry Torokhov
2012-10-29 18:22 ` Henrik Rydberg
2012-10-29 18:59 ` Dmitry Torokhov
2012-10-29 20:02 ` Henrik Rydberg
2012-10-29 20:40 ` Dmitry Torokhov
2012-10-29 21:32 ` Henrik Rydberg [this message]
2012-10-29 22:12 ` Dmitry Torokhov
2012-10-31 21:05 ` Tejun Heo
2012-10-31 21:37 ` Dmitry Torokhov
2012-10-31 21:38 ` Tejun Heo
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=20121029213254.GA15390@polaris.bitmath.org \
--to=rydberg@euromail.se \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@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).