]> git.baikalelectronics.ru Git - kernel.git/commit
iio: buffer: move __iio_buffer_free_sysfs_and_mask() before alloc
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Mon, 15 Feb 2021 10:40:36 +0000 (12:40 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 11 Mar 2021 20:47:04 +0000 (20:47 +0000)
commitaf43cf46510f110f8b85eabad65dd0cb9ee60ca0
tree17708b909b84f31fa9ec2dba85e60c83d3332869
parent1684877eb166477918e9735a506abf8943d88884
iio: buffer: move __iio_buffer_free_sysfs_and_mask() before alloc

The __iio_buffer_free_sysfs_and_mask() function will be used in
iio_buffer_alloc_sysfs_and_mask() when multiple buffers will be attached to
the IIO device.
This will need to be used to cleanup resources on each buffer, when the
buffers cleanup unwind will occur on the error path.

The move is done in this patch to make the patch that adds multiple buffers
per IIO device a bit cleaner.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20210215104043.91251-18-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-buffer.c