Skip to content

Commit 04fbdbb

Browse files
jic23nunojsa
authored andcommitted
iio: adc: ad7173: Fix uninitialized symbol is_current_chan
Move the definition down and make it a boolean that is initialized to false. Fixes: 13d12e3 ("iio: adc: ad7173: Add support for AD411x devices") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/r/202406232046.DKfBJq6o-lkp@intel.com/ Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 1050989 commit 04fbdbb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/iio/adc/ad7173.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -1188,7 +1188,7 @@ static int ad7173_fw_parse_channel_config(struct iio_dev *indio_dev)
11881188
struct device *dev = indio_dev->dev.parent;
11891189
struct iio_chan_spec *chan_arr, *chan;
11901190
unsigned int ain[AD7173_NO_AINS_PER_CHANNEL], chan_index = 0;
1191-
int ref_sel, ret, is_current_chan, num_channels;
1191+
int ref_sel, ret, num_channels;
11921192

11931193
num_channels = device_get_child_node_count(dev);
11941194

@@ -1234,6 +1234,8 @@ static int ad7173_fw_parse_channel_config(struct iio_dev *indio_dev)
12341234
}
12351235

12361236
device_for_each_child_node_scoped(dev, child) {
1237+
bool is_current_chan = false;
1238+
12371239
chan = &chan_arr[chan_index];
12381240
*chan = ad7173_channel_template;
12391241
chan_st_priv = &chans_st_arr[chan_index];

0 commit comments

Comments
 (0)