]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
iio: light: as73211: Ensure buffer holes are zeroed
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 2 Aug 2025 16:44:21 +0000 (17:44 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 16 Aug 2025 13:58:35 +0000 (14:58 +0100)
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>
drivers/iio/light/as73211.c

index 68f60dc3c79d530bb5f203c6623aeaf528dc2a99..32719f584c47a06e22087f03da4a77245a638ec7 100644 (file)
@@ -639,7 +639,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);