From: Michael Hennerich Date: Tue, 5 Jun 2012 09:52:18 +0000 (+0200) Subject: iio: adf4350: fix compiler warning [-Wuninitialized] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a21e6bfeb40eddf365d3e7841b37f3708fa6b13f;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git iio: adf4350: fix compiler warning [-Wuninitialized] drivers/iio/frequency/adf4350.c:316:32: warning: ‘val’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Michael Hennerich Reported-by: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c index fd4c8501aba9..2d09f82d9752 100644 --- a/drivers/iio/frequency/adf4350.c +++ b/drivers/iio/frequency/adf4350.c @@ -310,6 +310,8 @@ static ssize_t adf4350_read(struct iio_dev *indio_dev, case ADF4350_PWRDOWN: val = !!(st->regs[ADF4350_REG2] & ADF4350_REG2_POWER_DOWN_EN); break; + default: + ret = -ENODEV; } mutex_unlock(&indio_dev->mlock);