From b25a10631a81fca33a94d1f1f6960928d8e9ce63 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Mon, 28 Aug 2006 14:21:42 +0200 Subject: hdaps: Handle errors from input_register_device HDAPS: handle errors from input_register_device() Signed-off-by: Dmitry Torokhov Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman --- drivers/hwmon/hdaps.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/hwmon/hdaps.c') diff --git a/drivers/hwmon/hdaps.c b/drivers/hwmon/hdaps.c index 42b632889dd..8e7b5607f5a 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: -- cgit v1.2.3 From 710b8b5f4341e72a5f5f6fa58d1f73a0db64bf93 Mon Sep 17 00:00:00 2001 From: Soos Peter Date: Sat, 30 Sep 2006 23:28:06 -0700 Subject: [PATCH] hdaps: support Lenovo ThinkPad T60 Support hdaps on Lenovo ThinkPad T60. It was tested with pivot utility from http://www.kernel.org/pub/linux/kernel/people/rml/hdaps and it seems to be OK. Cc: Jean Delvare Cc: Greg Kroah-Hartman Cc: Robert Love Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/hwmon/hdaps.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/hwmon/hdaps.c') diff --git a/drivers/hwmon/hdaps.c b/drivers/hwmon/hdaps.c index 8e7b5607f5a..26be4ea8a38 100644 --- a/drivers/hwmon/hdaps.c +++ b/drivers/hwmon/hdaps.c @@ -537,6 +537,7 @@ static int __init hdaps_init(void) HDAPS_DMI_MATCH_NORMAL("ThinkPad T42"), HDAPS_DMI_MATCH_NORMAL("ThinkPad T43"), HDAPS_DMI_MATCH_LENOVO("ThinkPad T60p"), + HDAPS_DMI_MATCH_LENOVO("ThinkPad T60"), HDAPS_DMI_MATCH_NORMAL("ThinkPad X40"), HDAPS_DMI_MATCH_NORMAL("ThinkPad X41"), HDAPS_DMI_MATCH_LENOVO("ThinkPad X60"), -- cgit v1.2.3