Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

David Lechner and committed by
Jonathan Cameron
a8c8aad4 6b166e81

+2
+2
drivers/iio/industrialio-buffer.c
··· 2412 2412 { 2413 2413 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); 2414 2414 2415 + might_sleep(); 2416 + 2415 2417 /* 2416 2418 * Conservative estimate - we can always safely copy the minimum 2417 2419 * of either the data provided or the length of the destination buffer.