summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/touchscreen/atmel_mxt_ts.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 37190ab1f817..3ad942ca8725 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1184,10 +1184,13 @@ static int __devinit mxt_probe(struct i2c_client *client,
error = sysfs_create_group(&client->dev.kobj, &mxt_attr_group);
if (error)
- dev_warn(&client->dev, "error creating sysfs entries.\n");
+ goto err_unregister_device;
return 0;
+err_unregister_device:
+ input_unregister_device(input_dev);
+ input_dev = NULL;
err_free_irq:
free_irq(client->irq, data);
err_free_object: