diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2006-08-28 14:21:42 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-28 15:31:12 -0700 |
commit | b25a10631a81fca33a94d1f1f6960928d8e9ce63 (patch) | |
tree | 5f327a3b3af52fbd24b8ec5590f1f55d3ac8e5b9 /drivers/hwmon/hdaps.c | |
parent | c41bdb526bca5cda5be3de8c112f63c400bf990f (diff) | |
download | kernel-crypto-b25a10631a81fca33a94d1f1f6960928d8e9ce63.tar.gz kernel-crypto-b25a10631a81fca33a94d1f1f6960928d8e9ce63.tar.xz kernel-crypto-b25a10631a81fca33a94d1f1f6960928d8e9ce63.zip |
hdaps: Handle errors from input_register_device
HDAPS: handle errors from input_register_device()
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/hwmon/hdaps.c')
-rw-r--r-- | 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 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: |