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 <michael.hennerich@analog.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Michael Hennerich 2012-06-05 11:52:18 +02:00 committed by Greg Kroah-Hartman
parent 42b38207c3
commit a21e6bfeb4

View File

@ -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);