* [PATCH] input: check return value of input_register_device() in hil_ptr.c's init
@ 2008-01-12 20:13 Andres Salomon
0 siblings, 0 replies; only message in thread
From: Andres Salomon @ 2008-01-12 20:13 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: dtor, linux-input, Andrew Morton, linux-kernel
Signed-off-by: Andres Salomon <dilinger@debian.org>
---
drivers/input/mouse/hil_ptr.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/input/mouse/hil_ptr.c b/drivers/input/mouse/hil_ptr.c
index 27f88fb..de8b836 100644
--- a/drivers/input/mouse/hil_ptr.c
+++ b/drivers/input/mouse/hil_ptr.c
@@ -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",
--
1.5.3.5
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-01-12 20:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-12 20:13 [PATCH] input: check return value of input_register_device() in hil_ptr.c's init Andres Salomon
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).