summaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
authorAldo Conte <aldocontelk@gmail.com>2026-05-22 14:34:18 +0200
committerJonathan Cameron <jic23@kernel.org>2026-05-31 11:01:48 +0100
commit1ccae88c0a1023e0c9f757dc6b1fbca463b32b36 (patch)
tree78d664da62b2df8b5ec96191eaa1f24c4960671d /drivers/iio
parentc9dc65030e5705d17c9605a17732d15b71898d0b (diff)
downloadlinux-next-1ccae88c0a1023e0c9f757dc6b1fbca463b32b36.tar.gz
linux-next-1ccae88c0a1023e0c9f757dc6b1fbca463b32b36.zip
iio: tcs3472: move standalone return to default case
Move the trailing 'return -EINVAL' statements at the end of tcs3472_read_raw() and tcs3472_write_raw() into explicit default: cases inside the respective switch statements. This removes the need for a separate return statement after the switch. No functional change. Suggested-by: Andy Shevchenko <andy@kernel.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Reviewed-by: Joshua Crofts <joshua.crofts1@gmail.com> Signed-off-by: Aldo Conte <aldocontelk@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/light/tcs3472.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/iio/light/tcs3472.c b/drivers/iio/light/tcs3472.c
index 24b71d4543c5..b61442c5c1be 100644
--- a/drivers/iio/light/tcs3472.c
+++ b/drivers/iio/light/tcs3472.c
@@ -166,8 +166,9 @@ static int tcs3472_read_raw(struct iio_dev *indio_dev,
*val = 0;
*val2 = (256 - data->atime) * 2400;
return IIO_VAL_INT_PLUS_MICRO;
+ default:
+ return -EINVAL;
}
- return -EINVAL;
}
static int tcs3472_write_raw(struct iio_dev *indio_dev,
@@ -204,8 +205,9 @@ static int tcs3472_write_raw(struct iio_dev *indio_dev,
}
return -EINVAL;
+ default:
+ return -EINVAL;
}
- return -EINVAL;
}
/*