]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iio: light: as73211: remove duplicate zero init of scan.chan[3]
authorDavid Lechner <dlechner@baylibre.com>
Sun, 15 Mar 2026 19:21:51 +0000 (14:21 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 21 Mar 2026 19:35:56 +0000 (19:35 +0000)
Remove setting scan.chan[3] to zero. Since commit 433b99e92294 ("iio:
light: as73211: Ensure buffer holes are zeroed"), the entire scan struct
is zeroed before being filled with data, so this is redundant.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/as73211.c

index 32719f584c47a06e22087f03da4a77245a638ec7..9fe830dac67947f3cc174789137b64cf9cce6d73 100644 (file)
@@ -677,9 +677,6 @@ static irqreturn_t as73211_trigger_handler(int irq __always_unused, void *p)
                                (char *)&scan.chan[0], 3 * sizeof(scan.chan[0]));
                if (ret < 0)
                        goto done;
-
-               /* Avoid pushing uninitialized data */
-               scan.chan[3] = 0;
        }
 
        if (data_result) {