Skip to content

Commit 433b99e

Browse files
committed
iio: light: as73211: Ensure buffer holes are zeroed
Given that the buffer is copied to a kfifo that ultimately user space can read, ensure we zero it. Fixes: 403e558 ("iio: light: as73211: New driver") Reviewed-by: Matti Vaittinen <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://patch.msgid.link/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent c69e139 commit 433b99e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/light/as73211.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ static irqreturn_t as73211_trigger_handler(int irq __always_unused, void *p)
639639
struct {
640640
__le16 chan[4];
641641
aligned_s64 ts;
642-
} scan;
642+
} scan = { };
643643
int data_result, ret;
644644

645645
mutex_lock(&data->mutex);

0 commit comments

Comments
 (0)