From: Jonathan Cameron Date: Tue, 6 Apr 2021 08:23:37 +0000 (+0100) Subject: iio:cdc:ad7150: Fix use of uninitialized ret X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=032aec339c86b565b2eef5c677c59294ef1112b9;p=linux.git iio:cdc:ad7150: Fix use of uninitialized ret This doesn't appear to generate a warning on all versions of GCC, but 0-day reported it and the report looks valid. Reported-by: kbuild test robot Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/cdc/ad7150.c b/drivers/iio/cdc/ad7150.c index f9cce1a64586b..ebe112b4618b0 100644 --- a/drivers/iio/cdc/ad7150.c +++ b/drivers/iio/cdc/ad7150.c @@ -235,7 +235,7 @@ static int ad7150_write_event_config(struct iio_dev *indio_dev, enum iio_event_direction dir, int state) { struct ad7150_chip_info *chip = iio_priv(indio_dev); - int ret; + int ret = 0; /* * There is only a single shared control and no on chip