From 3624f038629d6b9ddf742f419ed7437bba0d2262 Mon Sep 17 00:00:00 2001 From: Massimiliano Pellizzer Date: Tue, 25 Nov 2025 18:18:16 +0100 Subject: [PATCH] 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 Reviewed-by: Jianping Shen Signed-off-by: Jonathan Cameron --- drivers/iio/imu/smi330/smi330_core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/iio/imu/smi330/smi330_core.c b/drivers/iio/imu/smi330/smi330_core.c index 7564f12543e0c..0cf673b44b629 100644 --- a/drivers/iio/imu/smi330/smi330_core.c +++ b/drivers/iio/imu/smi330/smi330_core.c @@ -475,7 +475,6 @@ static int smi330_read_avail(struct iio_dev *indio_dev, *vals = smi330_average_attr.vals; *length = smi330_average_attr.len; *type = smi330_average_attr.type; - *type = IIO_VAL_INT; return IIO_AVAIL_LIST; case IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY: *vals = smi330_bandwidth_attr.vals; -- 2.47.3