mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-11 17:10:13 +00:00
iio: buffer: iio_push_to_buffers_with_ts_unaligned() might_sleep()
Call might_sleep() in iio_push_to_buffers_with_ts_unaligned() since it can allocate memory, which may sleep. Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: David Lechner <dlechner@baylibre.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
6b166e815c
commit
a8c8aad411
@ -2412,6 +2412,8 @@ int iio_push_to_buffers_with_ts_unaligned(struct iio_dev *indio_dev,
|
||||
{
|
||||
struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev);
|
||||
|
||||
might_sleep();
|
||||
|
||||
/*
|
||||
* Conservative estimate - we can always safely copy the minimum
|
||||
* of either the data provided or the length of the destination buffer.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user