Commit c5b974be authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by Jonathan Cameron

iio: sca3000: Fix missing return in switch

The IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY case is missing a
return and will fall through to the default case and errorenously
return -EINVAL.

Fix this by adding in missing *return ret*.

Fixes: 626f971b ("staging:iio:accel:sca3000 Add write support to the low pass filter control")
Reported-by: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 5a4e33c1
...@@ -797,6 +797,7 @@ static int sca3000_write_raw(struct iio_dev *indio_dev, ...@@ -797,6 +797,7 @@ static int sca3000_write_raw(struct iio_dev *indio_dev,
mutex_lock(&st->lock); mutex_lock(&st->lock);
ret = sca3000_write_3db_freq(st, val); ret = sca3000_write_3db_freq(st, val);
mutex_unlock(&st->lock); mutex_unlock(&st->lock);
return ret;
default: default:
return -EINVAL; return -EINVAL;
} }
......
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