]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: adc: ad_sigma_delta: don't overallocate scan buffer
authorDavid Lechner <dlechner@baylibre.com>
Tue, 1 Jul 2025 21:37:49 +0000 (16:37 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:25:53 +0000 (16:25 +0200)
commitf99c99d18eec03c31f6669a0d96da07e3ca1fb18
treeb6c6d4e3d905ad3a601ae7e39d6820efb03083ca
parente52ec4dd28e6e9e5692c0ae3150821790f2a15b6
iio: adc: ad_sigma_delta: don't overallocate scan buffer

[ Upstream commit 5a2f15c5a8e017d0951e6dc62aa7b5b634f56881 ]

Fix overallocating the size of the scan buffer by converting bits to
bytes. The size is meant to be in bytes, so scanbits needs to be
divided by 8.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://patch.msgid.link/20250701-iio-adc-ad7173-add-spi-offload-support-v3-1-42abb83e3dac@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/iio/adc/ad_sigma_delta.c