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 <[email protected]>
Reported-by: Otavio Salvador <[email protected]>
Tested-by: Otavio Salvador <[email protected]>
Reviewed-by: Lars-Peter Clausen <[email protected]>
This commit is contained in:
Jonathan Cameron 2013-06-22 12:00:04 +01:00
commit 8bade40664

View file

@ -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);