This patch calls uninitialized_var function for uninitialized variable raw_sample. This error was reported by the static analysis tool, cppcheck.
Signed-off-by: Darshana Padmadas <darshanapadma...@gmail.com> --- drivers/iio/adc/ad_sigma_delta.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c index d10bd0c..f0bbf3c 100644 --- a/drivers/iio/adc/ad_sigma_delta.c +++ b/drivers/iio/adc/ad_sigma_delta.c @@ -248,7 +248,8 @@ int ad_sigma_delta_single_conversion(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, int *val) { struct ad_sigma_delta *sigma_delta = iio_device_get_drvdata(indio_dev); - unsigned int sample, raw_sample; + unsigned int sample; + unsigned int uninitialized_var(raw_sample); int ret = 0; if (iio_buffer_enabled(indio_dev)) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/