Skip to content

Commit

Permalink
iio: adf4350: fix compiler warning [-Wuninitialized]
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Hennerich authored and Greg Kroah-Hartman committed Jun 7, 2012
1 parent 42b3820 commit a21e6bf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/iio/frequency/adf4350.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a21e6bf

Please sign in to comment.