mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
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:
parent
42b38207c3
commit
a21e6bfeb4
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue