iio: light: isl76682: remove unreachable code
PATCH 1/1 iio: light: isl76682: remove unreachable code
The function isl76682_read_raw cannot execute return -EINVAL up to 145 lines, delete the invalid code.
drivers/iio/light/isl76682.c:145 isl76682_read_raw() warn: ignoring unreachable code.
Reported-by Abaci Robot <[email protected]>
Signed-off-by Jiapeng Chong <[email protected]>
--- drivers/iio/light/isl76682.c | 1 - 1 file changed, 1 deletion(-)
drivers/iio/light/isl76682.c +0 -1
@@ -142,7 +142,6 @@ static int isl76682_read_raw(struct iio_dev *indio_dev,default :return -EINVAL ; } -return -EINVAL ;case IIO_CHAN_INFO_SCALE :for (i =0 ; i <ARRAY_SIZE (isl76682_range_table); i++) {if (chip->range != isl76682_range_table[i].range)
Signature · 1 line
2.20.1.7.g153144c
Quoted 8 lines · On Fri, 8 Dec 2023 10:17:15 +0800 Jiapeng Chong…
The function
isl76682_read_rawcannot execute return-EINVALup to 145 lines, delete the invalid code.
drivers/iio/light/isl76682.c:145isl76682_read_raw()warn: ignoring unreachable code.Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>
Applied.
Thanks,
Jonathan
Quoted 16 lines
--- drivers/iio/light/isl76682.c | 1 - 1 file changed, 1 deletion(-)drivers/iio/light/isl76682.c +0
-1@@ -142,7 +142,6 @@ static int isl76682_read_raw(struct iio_dev *indio_dev,default :return -EINVAL ; } -return -EINVAL ;case IIO_CHAN_INFO_SCALE :for (i =0 ; i <ARRAY_SIZE (isl76682_range_table); i++) {if (chip->range != isl76682_range_table[i].range)