Skip to content

Commit a21e6bf

Browse files
mhennerichgregkh
authored andcommitted
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>
1 parent 42b3820 commit a21e6bf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/iio/frequency/adf4350.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,8 @@ static ssize_t adf4350_read(struct iio_dev *indio_dev,
310310
case ADF4350_PWRDOWN:
311311
val = !!(st->regs[ADF4350_REG2] & ADF4350_REG2_POWER_DOWN_EN);
312312
break;
313+
default:
314+
ret = -ENODEV;
313315
}
314316
mutex_unlock(&indio_dev->mlock);
315317

0 commit comments

Comments
 (0)