Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8bade406 authored by Jonathan Cameron's avatar Jonathan Cameron
Browse files

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: default avatarJonathan Cameron <jic23@kernel.org>
Reported-by: default avatarOtavio Salvador <otavio@ossystems.com.br>
Tested-by: default avatarOtavio Salvador <otavio@ossystems.com.br>
Reviewed-by: default avatarLars-Peter Clausen <lars@metafoo.de>
parent 94fccb78
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);