]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: imu: smi330: remove redundant assignment in smi330_read_avail
authorMassimiliano Pellizzer <mpellizzer.dev@gmail.com>
Tue, 25 Nov 2025 17:18:16 +0000 (18:18 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 21 Dec 2025 11:41:12 +0000 (11:41 +0000)
commit3624f038629d6b9ddf742f419ed7437bba0d2262
treef7a860c400633fcb9358fed2ca0a6944e4f022da
parent5a306a64bf790ed084601d7f3e89d5dc4a18a5c2
iio: imu: smi330: remove redundant assignment in smi330_read_avail

In the IIO_CHAN_INFO_OVERSAMPLING_RATIO case, the type parameter
is assigned from smi330_average_attr.type and then immediately
overwritten with IIO_VAL_INT on the next line.

Since smi330_average_attr.type is already initialized to IIO_VAL_INT,
the second assignment is redundant. Remove the hardcoded assignment
to maintain consistency in the code.

Signed-off-by: Massimiliano Pellizzer <mpellizzer.dev@gmail.com>
Reviewed-by: Jianping Shen <Jianping.Shen@de.bosch.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/smi330/smi330_core.c