summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2025-08-24 04:29:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-08-28 17:31:10 +0300
commitcce55ca4e7a221d5eb2c0b757a868eacd6344e4a (patch)
treec15717cabc29cac8bd67206a097a86834f53e4a4
parent1856de52e0f4c7fedd3153fe9cde8c4db1f7c87d (diff)
downloadlinux-cce55ca4e7a221d5eb2c0b757a868eacd6344e4a.tar.xz
iio: light: as73211: Ensure buffer holes are zeroed
[ Upstream commit 433b99e922943efdfd62b9a8e3ad1604838181f2 ] Given that the buffer is copied to a kfifo that ultimately user space can read, ensure we zero it. Fixes: 403e5586b52e ("iio: light: as73211: New driver") Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Link: https://patch.msgid.link/20250802164436.515988-2-jic23@kernel.org Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/iio/light/as73211.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/light/as73211.c b/drivers/iio/light/as73211.c
index 37fffce35dd1..36f6f2eb53b2 100644
--- a/drivers/iio/light/as73211.c
+++ b/drivers/iio/light/as73211.c
@@ -643,7 +643,7 @@ static irqreturn_t as73211_trigger_handler(int irq __always_unused, void *p)
struct {
__le16 chan[4];
aligned_s64 ts;
- } scan;
+ } scan = { };
int data_result, ret;
mutex_lock(&data->mutex);