aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@kernel.org>2013-06-22 07:00:04 -0400
committerJonathan Cameron <jic23@kernel.org>2013-06-29 08:26:11 -0400
commit8bade406649245292d6fcd1947cd7ad2ad8c80c1 (patch)
tree7ebd69124799c82fd5d27e23217cec0fe6491d0c
parent94fccb78414a87f3c4bc7049ff8b6e80156944d9 (diff)
iio:trigger: device_unregister->device_del to avoid double free
iio_trigger unregistration and freeing has been separated in this code for some time, but it looks like the calls to the device handling were not appropriately updated. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Reported-by: Otavio Salvador <otavio@ossystems.com.br> Tested-by: Otavio Salvador <otavio@ossystems.com.br> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
-rw-r--r--drivers/iio/industrialio-trigger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c
index 4d6c7d84e155..ea8a4146620d 100644
--- a/drivers/iio/industrialio-trigger.c
+++ b/drivers/iio/industrialio-trigger.c
@@ -104,7 +104,7 @@ void iio_trigger_unregister(struct iio_trigger *trig_info)
104 104
105 ida_simple_remove(&iio_trigger_ida, trig_info->id); 105 ida_simple_remove(&iio_trigger_ida, trig_info->id);
106 /* Possible issue in here */ 106 /* Possible issue in here */
107 device_unregister(&trig_info->dev); 107 device_del(&trig_info->dev);
108} 108}
109EXPORT_SYMBOL(iio_trigger_unregister); 109EXPORT_SYMBOL(iio_trigger_unregister);
110 110