Commit 0d3a9b2d authored by Sachin Kamat's avatar Sachin Kamat Committed by Jonathan Cameron

iio: ad5504: Remove redundant variable

By re-arranging the code, 'ret' can be removed from this
function.
Signed-off-by: default avatarSachin Kamat <sachin.kamat@samsung.com>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 15255c6b
...@@ -125,7 +125,6 @@ static int ad5504_write_raw(struct iio_dev *indio_dev, ...@@ -125,7 +125,6 @@ static int ad5504_write_raw(struct iio_dev *indio_dev,
long mask) long mask)
{ {
struct ad5504_state *st = iio_priv(indio_dev); struct ad5504_state *st = iio_priv(indio_dev);
int ret;
switch (mask) { switch (mask) {
case IIO_CHAN_INFO_RAW: case IIO_CHAN_INFO_RAW:
...@@ -134,10 +133,8 @@ static int ad5504_write_raw(struct iio_dev *indio_dev, ...@@ -134,10 +133,8 @@ static int ad5504_write_raw(struct iio_dev *indio_dev,
return ad5504_spi_write(st, chan->address, val); return ad5504_spi_write(st, chan->address, val);
default: default:
ret = -EINVAL; return -EINVAL;
} }
return -EINVAL;
} }
static const char * const ad5504_powerdown_modes[] = { static const char * const ad5504_powerdown_modes[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment