From: Jonathan Cameron Date: Sat, 22 Jun 2013 11:00:04 +0000 (+0100) Subject: iio:trigger: device_unregister->device_del to avoid double free X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8bade406649245292d6fcd1947cd7ad2ad8c80c1;p=linux-beck.git 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 Reported-by: Otavio Salvador Tested-by: Otavio Salvador Reviewed-by: Lars-Peter Clausen --- 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) ida_simple_remove(&iio_trigger_ida, trig_info->id); /* Possible issue in here */ - device_unregister(&trig_info->dev); + device_del(&trig_info->dev); } EXPORT_SYMBOL(iio_trigger_unregister);