All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [PATCH 4/39] hdaps: Handle errors from
@ 2006-09-28 22:48 Greg KH
  0 siblings, 0 replies; only message in thread
From: Greg KH @ 2006-09-28 22:48 UTC (permalink / raw)
  To: lm-sensors

From: Dmitry Torokhov <dtor at insightbb.com>

HDAPS: handle errors from input_register_device()

Signed-off-by: Dmitry Torokhov <dtor at mail.ru>
Signed-off-by: Jean Delvare <khali at linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
---
 drivers/hwmon/hdaps.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/hwmon/hdaps.c b/drivers/hwmon/hdaps.c
index 42b6328..8e7b560 100644
--- a/drivers/hwmon/hdaps.c
+++ b/drivers/hwmon/hdaps.c
@@ -587,7 +587,9 @@ static int __init hdaps_init(void)
 	input_set_abs_params(hdaps_idev, ABS_Y,
 			-256, 256, HDAPS_INPUT_FUZZ, HDAPS_INPUT_FLAT);
 
-	input_register_device(hdaps_idev);
+	ret = input_register_device(hdaps_idev);
+	if (ret)
+		goto out_idev;
 
 	/* start up our timer for the input device */
 	init_timer(&hdaps_timer);
@@ -598,6 +600,8 @@ static int __init hdaps_init(void)
 	printk(KERN_INFO "hdaps: driver successfully loaded.\n");
 	return 0;
 
+out_idev:
+	input_free_device(hdaps_idev);
 out_group:
 	sysfs_remove_group(&pdev->dev.kobj, &hdaps_attribute_group);
 out_device:
-- 
1.4.2.1



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-09-28 22:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-28 22:48 [lm-sensors] [PATCH 4/39] hdaps: Handle errors from Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.