On Mon, Jul 26, 2010 at 1:34 PM, Dmitry Torokhov
<dmitry.torok...@gmail.com> wrote:
> On Mon, Jul 26, 2010 at 10:13:52AM -0400, Jarod Wilson wrote:
>> Per Dmitry Torokhov (in a completely unrelated thread on linux-input),
>> following input_unregister_device with an input_free_device is
>> forbidden, the former is sufficient alone.
>>
>> CC: Dmitry Torokhov <dmitry.torok...@gmail.com>
>> Signed-off-by: Jarod Wilson <ja...@redhat.com>
>
> Acked-by: Dmitry Torokhov <d...@mail.ru>
>
> Random notes about irmon:
>
> imon_init_idev():
>        memcpy(&ir->dev, ictx->dev, sizeof(struct device));
>
> This is... scary.  Devices are refcounted and if you copy them around
> all hell may break loose. On an unrelated note you do not need memcpy to
> copy a structire, *it->dev = *ictx->dev will do.
>
> imon_init_idev(), imon_init_touch(): - consizer returning proper error
> codes via ERR_PTR() and check wit IS_ERR().

Hm, I'm overdue to give that driver another look (bz.k.o #16351), will
add looking at these to the TODO list... (have immortalized them in
the bz).


-- 
Jarod Wilson
ja...@wilsonet.com
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to