Skip to content

Commit 1ccae88

Browse files
aldocontelkjic23
authored andcommitted
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>
1 parent c9dc650 commit 1ccae88

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/iio/light/tcs3472.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,9 @@ static int tcs3472_read_raw(struct iio_dev *indio_dev,
166166
*val = 0;
167167
*val2 = (256 - data->atime) * 2400;
168168
return IIO_VAL_INT_PLUS_MICRO;
169+
default:
170+
return -EINVAL;
169171
}
170-
return -EINVAL;
171172
}
172173

173174
static int tcs3472_write_raw(struct iio_dev *indio_dev,
@@ -204,8 +205,9 @@ static int tcs3472_write_raw(struct iio_dev *indio_dev,
204205

205206
}
206207
return -EINVAL;
208+
default:
209+
return -EINVAL;
207210
}
208-
return -EINVAL;
209211
}
210212

211213
/*

0 commit comments

Comments
 (0)