|
@@ -587,7 +587,9 @@ static int __init hdaps_init(void)
|
|
input_set_abs_params(hdaps_idev, ABS_Y,
|
|
input_set_abs_params(hdaps_idev, ABS_Y,
|
|
-256, 256, HDAPS_INPUT_FUZZ, HDAPS_INPUT_FLAT);
|
|
-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 */
|
|
/* start up our timer for the input device */
|
|
init_timer(&hdaps_timer);
|
|
init_timer(&hdaps_timer);
|
|
@@ -598,6 +600,8 @@ static int __init hdaps_init(void)
|
|
printk(KERN_INFO "hdaps: driver successfully loaded.\n");
|
|
printk(KERN_INFO "hdaps: driver successfully loaded.\n");
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
|
|
+out_idev:
|
|
|
|
+ input_free_device(hdaps_idev);
|
|
out_group:
|
|
out_group:
|
|
sysfs_remove_group(&pdev->dev.kobj, &hdaps_attribute_group);
|
|
sysfs_remove_group(&pdev->dev.kobj, &hdaps_attribute_group);
|
|
out_device:
|
|
out_device:
|