Re: [PATCH 2/2] iio: Remove debugfs entries in iio_device_unregister()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/21/13 16:21, Lars-Peter Clausen wrote:
> Remove the the debugfs entries in iio_device_unregister(). Otherwise the debugfs
> entries might still be accessible even though the device used in the debugfs
> callback has already been freed.
> 
> Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx>
Applied to the fixes-togreg branch of iio.git

Thanks,
> ---
>  drivers/iio/industrialio-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index d189f6c..b8a16d7 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -853,7 +853,6 @@ static void iio_dev_release(struct device *device)
>  		iio_device_unregister_trigger_consumer(indio_dev);
>  	iio_device_unregister_eventset(indio_dev);
>  	iio_device_unregister_sysfs(indio_dev);
> -	iio_device_unregister_debugfs(indio_dev);
>  
>  	if (indio_dev->buffer)
>  		iio_buffer_put(indio_dev->buffer);
> @@ -1091,6 +1090,7 @@ void iio_device_unregister(struct iio_dev *indio_dev)
>  
>  	if (indio_dev->chrdev.dev)
>  		cdev_del(&indio_dev->chrdev);
> +	iio_device_unregister_debugfs(indio_dev);
>  
>  	iio_disable_all_buffers(indio_dev);
>  
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux