iio: srf08: Remove redundant if statement
(!val) has been checked outside the loop, remove redundant (val &&) from loop. Signed-off-by: Li Zhengyu <lizhengyu3@huawei.com> Acked-by: Andreas Klinger <ak@it-klinger.de> Link: https://lore.kernel.org/r/20220523122755.90638-1-lizhengyu3@huawei.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Родитель
a5daaa470b
Коммит
574e60b3d7
|
@ -354,7 +354,7 @@ static ssize_t srf08_write_sensitivity(struct srf08_data *data,
|
|||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < data->chip_info->num_sensitivity_avail; i++)
|
||||
if (val && (val == data->chip_info->sensitivity_avail[i])) {
|
||||
if (val == data->chip_info->sensitivity_avail[i]) {
|
||||
regval = i;
|
||||
break;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче