Thread (14 messages) 14 messages, 4 authors, 2007-10-29

Re: [PATCH] INPUT: fix hidinput_connect ignoring retval from input_register_device

From: Jeff Garzik <hidden>
Date: 2007-10-29 14:49:19
Also in: lkml

Dmitry Torokhov wrote:
On 10/29/07, Jiri Kosina [off-list ref] wrote:
quoted
On Mon, 29 Oct 2007, Dirk Hohndel wrote:
quoted
[INPUT] hidinput_connect incorrectly ignored return value from
input_register_device
Signed-off-by: Dirk Hohndel <redacted>
Will apply
Please don't - the fix is completely broken for multi-input devices -
if 2nd device fails to register we bail out of hidinput_connect and
thus never set HID_CLAIMED_INPUT bit. So when we disconnect device we
never call hidinput_disconnect and who knows what will happen after
that.

hidinput_connect() should properly unwind already registered devices
after failure.
Then the existing code to handle hidinput and input_dev allocation 
failure probably also wants fixing...  Dirk's patch was largely 
following the same logic.

	Jeff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help