input: check return value of input_register_device() in hil_ptr.c's init
Subsystems (2)
PATCH 1/1 input: check return value of input_register_device() in hil_ptr.c's init
Signed-off-by Andres Salomon <[email protected]>
--- drivers/input/mouse/hil_ptr.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/input/mouse/hil_ptr.c +4 -1
@@ -380,7 +380,10 @@ static int hil_ptr_connect(struct serio *serio, struct serio_driver *driver) ptr->dev->id.version =0x0100 ;/* TODO: get from ptr->rsc */ ptr->dev->dev.parent = &serio->dev; -input_register_device (ptr->dev); +if (input_register_device (ptr->dev)) { + printk(KERN_INFO PREFIX "Unable to register input device\n"); + goto bail2; + } printk(KERN_INFO "input: %s (%s), ID: %d\n", ptr->dev->name, (btntype == BTN_MOUSE) ? "HIL mouse":"HIL tablet or touchpad",
Signature · 1 line
1.5.3.5