Skip to content

Commit

Permalink
iio:trigger: device_unregister->device_del to avoid double free
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Cameron committed Jun 29, 2013
1 parent 94fccb7 commit 8bade40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iio/industrialio-trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 8bade40

Please sign in to comment.