diff options
-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 42b632889dd8..8e7b5607f5a1 100644 --- a/drivers/hwmon/hdaps.c +++ b/drivers/hwmon/hdaps.c | |||
@@ -587,7 +587,9 @@ static int __init hdaps_init(void) | |||
587 | input_set_abs_params(hdaps_idev, ABS_Y, | 587 | input_set_abs_params(hdaps_idev, ABS_Y, |
588 | -256, 256, HDAPS_INPUT_FUZZ, HDAPS_INPUT_FLAT); | 588 | -256, 256, HDAPS_INPUT_FUZZ, HDAPS_INPUT_FLAT); |
589 | 589 | ||
590 | input_register_device(hdaps_idev); | 590 | ret = input_register_device(hdaps_idev); |
591 | if (ret) | ||
592 | goto out_idev; | ||
591 | 593 | ||
592 | /* start up our timer for the input device */ | 594 | /* start up our timer for the input device */ |
593 | init_timer(&hdaps_timer); | 595 | init_timer(&hdaps_timer); |
@@ -598,6 +600,8 @@ static int __init hdaps_init(void) | |||
598 | printk(KERN_INFO "hdaps: driver successfully loaded.\n"); | 600 | printk(KERN_INFO "hdaps: driver successfully loaded.\n"); |
599 | return 0; | 601 | return 0; |
600 | 602 | ||
603 | out_idev: | ||
604 | input_free_device(hdaps_idev); | ||
601 | out_group: | 605 | out_group: |
602 | sysfs_remove_group(&pdev->dev.kobj, &hdaps_attribute_group); | 606 | sysfs_remove_group(&pdev->dev.kobj, &hdaps_attribute_group); |
603 | out_device: | 607 | out_device: |